diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index a89bb638c..c6df5c897 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -102,8 +102,10 @@ class ExtBabel(Babel): return '\\shorthandoff{"}' return '' - _ISO639_TO_BABEL = Babel._ISO639_TO_BABEL.copy() - _ISO639_TO_BABEL['sl'] = 'slovene' +# in latest trunk, the attribute is called Babel.language_codes and already +# includes Slovene +if hasattr(Babel, '_ISO639_TO_BABEL'): + Babel._ISO639_TO_BABEL['sl'] = 'slovene' class Table(object):