Title case in Celtic names

I'm looking for a way of implementing title case on Ruby strings that can
handle Scottish and Irish names.

I have installed the titlecase gem and this works fine in most general cases. I
could live with the odd aberration that can be manually adjusted after
processing. However, I live in Scotland and I deal with a lot of mailing
lists, so names like McLeod, MacGregor and the Irish O'Beirne are very common.
Titlecase doesn't handle these at all.

I've searched the gem repositories and I can't find anything that would help.
Does anybody know of anything? Or is it down to writing it myself?

Hi Rosalind,

I've had a similar problem. But I didn't solve it properly for a simple reason - there really aren't any hard and fast rules as to how it should be capitalised: Macgregor is just as common as MacGregor. I just ended up hard coding certain capitalisations.

Graham

ยทยทยท

On 08/10/2017 07:17, Rosalind Mitchell wrote:

I'm looking for a way of implementing title case on Ruby strings that can
handle Scottish and Irish names.

I have installed the titlecase gem and this works fine in most general cases. I
could live with the odd aberration that can be manually adjusted after
processing. However, I live in Scotland and I deal with a lot of mailing
lists, so names like McLeod, MacGregor and the Irish O'Beirne are very common.
Titlecase doesn't handle these at all.

I've searched the gem repositories and I can't find anything that would help.
Does anybody know of anything? Or is it down to writing it myself?