Sorry to bump this but I've come to a realization that this will become an issue in the future when distinguishing different variations of a language such as Chinese.
Here is the generic list of i18n codes:
https://www.science.co.il/language/Locale-codes.php
Should we standardize this when developing extensions and adding translations? I honestly think we should, but it's a very subjective topic.
What if a user wanted to create a translation file for Chinese - Singapore? They would essentially put "sg" but that just indicates that it's it's own language code and has no prefix to group it under the appropriate language code such as "zh".
ReFlar will test the possibilities of seeing if language code prefixes are supported and if not? Well, we can take it from there I guess but @tony199555 does bring up a good point.
Does Flarum support the PHP related identifiers for locale as explained briefly here or is it managed through a package in a different way?
See here and here for example usage and supported languages (officially).
I believe that translation files such as cn.yml
should not be accepted due to it not being prefixed properly and following the ISO-639 standard. Having a prefix + -
+ language tag should be the appropriate usage especially with Chinese.
E.g. zh-cn