def register_account_preferred_language_preferences(request): if len(get_available_admin_languages()) > 1: return { 'url': reverse('wagtailadmin_account_language_preferences'), 'label': _('Language preferences'), 'help_text': _('Choose the language you want to use here.'), }
def test_available_admin_languages_with_permitted_languages(self): self.assertListEqual(get_available_admin_languages(), [('en', 'English'), ('es', 'Spanish')])
def test_available_admin_languages_by_default(self): self.assertListEqual(get_available_admin_languages(), WAGTAILADMIN_PROVIDED_LANGUAGES)
def _get_language_choices(): return sorted(BLANK_CHOICE_DASH + get_available_admin_languages(), key=lambda l: l[1].lower())