parler.utils package¶
Utility functions to handle language codes and settings.
- parler.utils.get_active_language_choices(language_code=None)¶
Find out which translations should be visible in the site. It returns a tuple with either a single choice (the current language), or a tuple with the current language + fallback language.
- parler.utils.get_language_settings(language_code, site_id=None)¶
Return the language settings for the current site
- parler.utils.get_language_title(language_code)¶
Return the verbose_name for a language code.
Fallback to language_code if language is not found in settings.
- parler.utils.is_multilingual_project(site_id=None)¶
Whether the current Django project is configured for multilingual support.
- parler.utils.is_supported_django_language(language_code)¶
Return whether a language code is supported.
- parler.utils.normalize_language_code(code)¶
Undo the differences between language code notations
Submodules: