diff --git a/conf.py b/conf.py index 500c4f87f..cf7dcc0d2 100644 --- a/conf.py +++ b/conf.py @@ -235,6 +235,8 @@ languages_names = { 'it': 'IT', 'nl': 'NL', 'pt_BR': 'PT', + 'ro': 'RO', + 'sv': 'SV', 'uk': 'UA', 'zh_CN': 'ZH (CN)', 'zh_TW': 'ZH (TW)' @@ -445,7 +447,7 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree): """ _current_lang = app.config.language or 'en' # Replace the context value by its upper-cased value ("FR" instead of "fr") - context['language'] = languages_names.get(_current_lang) + context['language'] = languages_names.get(_current_lang, _current_lang.upper()) context['language_code'] = _current_lang # If the list of languages is not set, assume that the project has no alternate language