Skip to content

Conversation

limonte
Copy link
Contributor

@limonte limonte commented Nov 19, 2015

As discussed in #3936

Select2 uses the ISO 639-1 language code to name the language file. In cases where there are variants for a language (pt-PT and pt-BR, for example), we keep the main language file as the dominant language (pt-PT becomes pt) when needed, or separate the two (zh-CN and zh-TW) when there is no dominant language.

In this case, the ISO language code for Serbian is sr. The IANA Language Subtag Registry defines subtags for script variants (Latin is Latn and Cyrillic is Cyrl) which we can use to differentiate between the two. So the existing translation would be sr-Latn and the new translation would be sr-Cyrl. For backwards compatibility, I'd rather keep sr-Latn as sr, just so people don't have to change that on a minor update (even if it might not be the dominant or official script, backwards compatibility is important).

@kevin-brown
Copy link
Member

I'm just going to pull this comment on in

Side note: We are also missing the errorLoading translation for these files. Is anyone interested in adding it?

Right now this will default back to the English translation if there are any issues when loading the results.

@kevin-brown kevin-brown added this to the 4.0.1 milestone Nov 20, 2015
@limonte
Copy link
Contributor Author

limonte commented Nov 20, 2015

@kevin-brown I've added errorLoading translations to sr, sr-Cyrl and hr languages.

@kevin-brown
Copy link
Member

Thanks!

kevin-brown added a commit that referenced this pull request Nov 23, 2015
@kevin-brown kevin-brown merged commit f94b462 into select2:master Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants