- This topic has 1 reply, 2 voices, and was last updated Aug 22-8:25 pm by BobC.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Forum › Forums › antiX-development › Development › Important information for script developers concerning the language identifiers
Hi all,
it turned out, there are some language identifiers in our list of languages, comprising of 3 instead of 2 characters, respectively 6 instead of 5 characters for “four significant letter codes”.
This is due to the fact, that some languages follow the regulations ISO 639-2, ISO 639-3 and ISO 639-5 instead of ISO 639-1.
So please make sure NOT to use the character count anymore in your scripts, like:
UI_lang_2=”$(echo $LANG | cut -c -2)”
UI_lang_4=”$(echo $LANG | cut -c -5)”
(which works fine for any language following ISO 639-1, like »fr«, »fr_BE« »pt«, »pt_BR« »de«, »ru«,…. )
Better use the field separators instead, which will cut the correct language identifier irrespectiv of its actual character count:
UI_lang_4="$(echo $LANG | cut -d. -f1)"
UI_lang_2="$(echo $LANG | cut -d. -f1 | cut -d_ -f1)"
The result is exactly identical for two/four character languages, so it can simply get used as a 1:1 replacement which will correctly distinguish between e.g.
»fi« and »fil«.
We’ll probably have to check all our scripts for this problem, since it’ll cause a bug for people coming from a country with a language identifier affected, as soon as they actively start using antiX. E.g. their language »fil« will get interpreted as »fi« if a script is not crafted to handle the three characters of their language identifier correctly.
So long
Robin.
Windows is like a submarine. Open a window and serious problems will start.
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |