| |
Class methods defined here:
- get_iso_code_639_1(code: str) -> Optional[str] from builtins.type
- Converts a language code string to its ISO 639-1 two-letter code.
:param code: Language code string (e.g., 'zh-CN', 'en_US', 'en')
:type code: str
:return: Two-letter ISO 639-1 code (e.g., 'zh', 'en'), or None if the code is invalid, excluded, or empty
:rtype: Optional[str]
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- EXCLUDED_CODES = {'bs', 'ms'}
|