cuba-platform / documentation

CUBA Platform Documentation
https://www.cuba-platform.com
Creative Commons Attribution 4.0 International
26 stars 45 forks source link

Update information about localizations #619

Open soraksh opened 4 years ago

soraksh commented 4 years ago

Environment

Description of the enhancement

See Cuba #2524 Since Cuba 7.2 locales could include script part, e.g. sr-Latn. But locales with script should be defined using IETF BCP 47 language tag and language suffix of associated message pack should also be that language tag. Locales with country and variant also supported, e.g. en_US (language + country, was supported previously) and ja_JP_JP (language + country + variant, was not supported previously, but it was supposed to be). I suppose it should also be explained for cuba.availableLocales app property ({language_code} part).

Messages are retrieved from the packs according to the following priority: 1) Check message packs with full name (e.g. messages_sr-Latn.properties for sr-Latn, messages_ja_JP_JP.properties for ja_JP_JP) 2) If not found previously, check language message packs (e.g. messages_sr.properties for sr-Latn, messages_ja.properties for ja_JP_JP) - rules explained in "Message Packs" section starts from that step.