Mandatory background read on language tags: [1].
Some quotes from [1]:
The golden rule when creating language tags is to keep the tag as short as possible. Avoid region, script or other subtags except where they add useful distinguishing information. For instance, use 'ja' for Japanese and not 'ja-JP', unless there is a particular reason that you need to say that this is Japanese as spoken in Japan, rather than elsewhere.
The entries in the registry follow certain conventions with regard to upper and lower letter-casing. For example, language tags are lower case, alphabetic region subtags are upper case, and script tags begin with an initial capital. This is only a convention!
Note that we use lower case subtags in subtag identifiers and URLs.
Language+extlang combinations are provided to accommodate legacy language tag forms, however, there is a single language subtag available for every language+extlang combination. That language subtag should be used rather than the language+extlang combination, where possible. For example, use 'yue' rather than 'zh-yue' for Cantonese, and 'afb' rather than 'ar-afb' for Gulf Arabic, if you can.codes_atom/0 | |
codes_bin/0 | |
fallback/1 | |
is_language/1 | |
languages_list/0 | |
languages_map_flat/0 | |
languages_map_main/0 | |
make_mod/0 | |
make_mod_reload/0 | |
to_language_atom/1 |
codes_atom() -> [atom()]
codes_bin() -> [binary()]
fallback(Code::z_language:language()) -> [z_language:language_code()]
is_language(Lang::z_language:language()) -> boolean()
languages_list() -> [{binary(), proplists:proplist()}]
languages_map_flat() -> #{z_language:language_code() | binary() => map()}
languages_map_main() -> any()
make_mod() -> any()
make_mod_reload() -> any()
to_language_atom(Lang::z_language:language()) -> {ok, atom()} | {error, not_a_language}
Generated by EDoc