gadicc / meteor-messageformat

MessageFormat i18n support for Meteor, with reactive templates
55 stars 22 forks source link

Language identifier convention #107

Open bajiat opened 9 years ago

bajiat commented 9 years ago

Currently, the translation UI allows developers to name / identify languages using arbitraty codes for languages. This results in two different issues: 1) not being able to match browser locale with website language. 2) miscommunication inside the team about which languages are meant by the identifiers: e.g. which languages to send to which translator.

How about allowing only ISO standard identifiers (e.g. ISO 639-1)? Maybe give also an option to identifying a country-specific variant, e.g. en_GB?

Related to #73

DSpeichert commented 9 years ago

We could turn the input text field (while creating a new language) into a drop-down with a list of options, but I wouldn't strictly enforce conformance to ISO.

One reason is that the user/developer might have a good reason to use a different identifier for the language for whatever reasons they might have. It would be an unnecessary bottleneck to prohibit it.

On the other hand, if you do allow end users to create new languages, there is a lot more input validation that needs to be done first, so I don't think limiting language identifiers would cover any extent of it.