sindresorhus / transliterate

Convert Unicode characters to Latin characters using transliteration
MIT License
286 stars 20 forks source link

Swedish substitute list contains 1 extra letter #3

Open dotnetCarpenter opened 4 years ago

dotnetCarpenter commented 4 years ago

I was interested to why Swedish was included but none of the other Scandinavian languages and I spotted a letter I have never seen in Swedish before Ë. There is also no mention of Swedish on Wikipedia (English nor Norwegian or Swedish version).

// Disabled as it conflicts with German and Latin.
// Swedish
// ['å', 'o'],
// ['Å', 'o'],
// ['ä', 'a'],
// ['Ä', 'A'],
// ['ë', 'e'], <-- does not exist in any Scandinavian language
// ['Ë', 'E'], <-- does not exist in any Scandinavian language
// ['ö', 'o'],
// ['Ö', 'O'],

I'm Danish, lived in Sweden and speak Swedish. Currently I live in Norway and are picking up Norwegian as well.

If you want to get support for the rest of the Scandinavian languages, you are in luck. Both Norwegian and Danish share letters and translation to Latin letters, although we do not pronounce Latin letters the same.

Norwegian and Danish:

['æ', 'ae'],
['Æ', 'Ae'],
['ø', 'oe'],
['Ø', 'Oe'],
['å', 'aa'],
['Å', 'Aa'],
dotnetCarpenter commented 4 years ago

Oh, I forgot to mention that Scandinavian languages share the é (acute accent) with French.

Wikipedia text is spot on:

Norwegian, Swedish and Danish use the acute accent to indicate that a terminal syllable with the e is stressed and is often omitted if it does not change the meaning: armen (first syllable stressed) means "the arm" while armé(e)n means "the army"; ide (first syllable stressed) means "bear's den" while idé means "idea". Also stress-related are the different spellings of the words en/én and et/ét (the indefinite article and the word "one" in Danish and Norwegian). In Norwegian, however, the neuter word "one" is spelled ett. Then, the acute points out that there is one and only one of the object, which derives from the obsolete spelling(s) een and eet. Some loanwords, mainly from French, are also written with the acute accent, such as Norwegian and Swedish kafé and Danish café (also cafe).

sindresorhus commented 4 years ago

Oh, I should have caught this myself. I'm Norwegian...

dotnetCarpenter commented 4 years ago

@sindresorhus Do you speak nynorsk? Then you might shed some light on the nynorsk transliteration of the following letters: ô, ô, è, ê, ó, ò, â and ô.

https://github.com/sindresorhus/transliterate/issues/2#issuecomment-596162057

martinfjant commented 4 years ago

Might I ask why å is rendered as o? Most Swedes tend to just use a if å is not available, and substituting it with o would just be confusing.

dotnetCarpenter commented 4 years ago

@martinfjant should be:

    // Swedish
    ['å', 'a'],
    ['Å', 'A'],
    ['ä', 'a'],
    ['Ä', 'A'],
    ['ö', 'o'],
    ['Ö', 'O'],

right?

2 Would have to be fixed before any of this take any effect though...