Skip to main content

check_for_language

Check whether there is a global language file for the given language code. This is used to decide whether a user-provided language is available.

def check_for_language(
lang_code: string
) - > boolean

Check whether there is a global language file for the given language code. This is used to decide whether a user-provided language is available.

Parameters

NameTypeDescription
lang_codestringThe IETF language tag (e.g., 'en-us' or 'fr') to validate against available locale files

Returns

TypeDescription
booleanTrue if a valid translation catalog exists for the provided language code, otherwise False