Open altrisi opened 3 years ago
How about we only add region specifiers when options are available? Is that compatible with what you have in mind? This means, that it_it
would become it
, but say someone adds es_me
, then we have two es_*
files. Does that work?
Would be possible, but would complicate the code.
To handle that case you'd need to, after getting the list of available language files, check whether two or more have the same prefix, then keep those with the suffix but strip it from the other ones. Then when automatically setting languages you have a problem, since you may have to choose which region to give to the player, and while that's simple if one matches exactly, if their language only shares the prefix, you'd need a way to determine which region to choose.
Plus I'd assume many of the language files with the same prefix would be almost identical, varying at most in a pair or three entries, that can possibly be made neutral instead.
I agree, we can remove them and, if anyone ands up doing regional variation translations, we can worry about them later.
Well idk about that complexity. As altrisi said, you are likely to understand another variant of the same language, but IMO we should keep names just as they are. But the way we do it is this: First we check that we have that language, and then we look to see if we have the variant, and if not we just choose the first in the list. Seen as though we will typically only rly have a handful of variants, that bit shouldn't matter much. The code isn't too hard either I think, just a bit of regex.
It's not only about code complexity. Having region specific languages also causes:
TL;DR I just don't think it's worth. Not specifying a region allows anyone to update the language for every region, and people are less likely to complain/be upset about not having the proper region. At least right now at least, given we don't have many.
(also because I think somewhere I have a branch started with that in mind, though that should be easy to change anyway)
Well I kind of disagree:
@gnembon , @Firigion , @replaceitem , @BisUmTo @altrisi , please vote here below, if you prefer having regional languages as per my solution to the problem, or not, as per altrisi's (also feel free to propose any alternative solutions)
Honestly I think that some languages are a lot different...
If in the future carpet allows to get client Minecraft language, It would be interesting to be able to select automatically the language based on the selected one.
(it already allows Scarpet to get user's language, I have a branch on it and a few things more for SE that I'm just lazy to finish, also partially blocked by this)
it already allows Scarpet to get user's language
I've just discovered player ~ 'language'
😂😂
I'm suggesting for languages to not be region specific, so instead of
en_us
it would be justen
, etc.Why?
Because most people can perfectly understand the variant of their language from most regions, and it simplifies the code for both having the language files (less almost duplicates) and allows an automatic language selector (see #87) to have more options, since it's quite likely the player will understand the variant from other regions as well, and else they may not get a translation just because they selected a different region.
Opinions?