View Source t__languages (t__ v0.1.0)

Link to this section Summary

Functions

Select and return a proplist containing language specifications. If the language is not in our database, returns undefined.

Return true if the specified language is a valid gettext language string or false otherwise. We don't actually validate all possible languages and locales/teritories/area codes, but we check the general format. As a result the implementation remain compatible with all possible iso_639 past and future codes.

Link to this section Functions

-spec get_specs(Language) -> Specs when Language :: term(), Specs :: undefined | proplists:proplist().
Select and return a proplist containing language specifications. If the language is not in our database, returns undefined.
-spec is_gettext_language(term()) -> true | false.

Return true if the specified language is a valid gettext language string or false otherwise. We don't actually validate all possible languages and locales/teritories/area codes, but we check the general format. As a result the implementation remain compatible with all possible iso_639 past and future codes.

Many libraries out there miss some rare languages codes (including the academic or dead languages) because they try to validate based on a incomplete database.

Please also notice that we are only interested in ISO 639 codes because if we don't recognize the ISO 639/area code combination we fall back on ISO 639 (either revision 1 or 2) code for determining the formula.