(lang, set_environ=True, **kwargs)
Set the current language used for translations.

    ``lang`` should be a string or a list of strings. If a list of
    strings, the first language is set as the main and the subsequent
    languages are added as fallbacks.
Set the current language used for translations.
Set the current language used for translations .
def set_lang(lang, set_environ=True, **kwargs):
    """Set the current language used for translations.

    ``lang`` should be a string or a list of strings. If a list of
    strings, the first language is set as the main and the subsequent
    languages are added as fallbacks.
    """
    translator = _get_translator(lang, **kwargs)
    if not set_environ:
        return translator
    environ = pylons.request.environ
    environ['pylons.pylons'].translator = translator
    if 'paste.registry' in environ:
        environ['paste.registry'].replace(pylons.translator, translator)
def set_lang ( lang , set_environ = True , * * kwargs ) : translator = _get_translator ( lang , * * kwargs ) if not set_environ : return translator environ = pylons . request . environ environ [ 'pylons.pylons' ] . translator = translator if 'paste.registry' in environ : environ [ 'paste.registry' ] . replace ( pylons . translator , translator )