nolanlawson / emoji-picker-element

A lightweight emoji picker for the modern web

Home Page:https://nolanlawson.github.io/emoji-picker-element/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unify language codes in the i18n file names.

dariuszdawidowski opened this issue · comments

I think it would be better to use ISO language codes for all file names in emoji-picker-element/i18n/*.js so it would be easy to use with window.navigator.language. At this moment some of them has double ISO name like pt_BR, some not like: pl, en, etc.

Yeah this is a historical result of which languages folks decided to add translations for. And some of the translators decided to specify e.g. Brazilian Portuguese rather than just Portuguese. (I'm not an expert on Portuguese, so I deferred to the translator's judgment.)

There is also some trickiness with "languages" with vastly different writing systems or vocabulary. Like we have zh_CN but if we had traditional Chinese or Cantonese it would probably look very different.

BTW this would be a breaking change. Assuming what you're asking for is for all the language codes to just be the two-letter version and not the double ISO names?

BTW this would be a breaking change. Assuming what you're asking for is for all the language codes to just be the two-letter version and not the double ISO names?

I think double ISO names are better. Broser variable window.navigator.language already contains double name (but with dash not underscore) this could be used directly to initialize language.