Esempio n. 1
0
def set_user_lang(user, user_language=None):
	from webnotes.translate import get_lang_dict
	
	if not user_language:
		user_language = conn.get_value("Profile", user, "language")
	
	if user_language:
		lang_dict = get_lang_dict()
		if user_language in lang_dict:
			local.lang = lang_dict[user_language]
Esempio n. 2
0
def set_user_lang(user, user_language=None):
    from webnotes.translate import get_lang_dict

    if not user_language:
        user_language = conn.get_value("Profile", user, "language")

    if user_language:
        lang_dict = get_lang_dict()
        if user_language in lang_dict:
            local.lang = lang_dict[user_language]
Esempio n. 3
0
def get_languages():
	from webnotes.translate import get_lang_dict
	languages = get_lang_dict().keys()
	languages.sort()
	return [""] + languages
Esempio n. 4
0
def get_languages():
    from webnotes.translate import get_lang_dict
    languages = get_lang_dict().keys()
    languages.sort()
    return [""] + languages