Mercurial > babel > old > babel-test
diff babel/core.py @ 148:37f4875bad88
The `LANGUAGE` environment variable may contain a colon-separated list of language codes.
author | cmlenz |
---|---|
date | Wed, 20 Jun 2007 20:18:52 +0000 |
parents | b75ae5def3b1 |
children | e1985b8cdcd6 |
line wrap: on
line diff
--- a/babel/core.py +++ b/babel/core.py @@ -539,6 +539,10 @@ for name in filter(None, varnames): locale = os.getenv(name) if locale: + if name == 'LANGUAGE' and ':' in locale: + # the LANGUAGE variable may contain a colon-separated list of + # language codes; we just pick the language on the list + locale = locale.split(':')[0] return '_'.join(filter(None, parse_locale(locale))) def negotiate_locale(preferred, available, sep='_'):