def load_lang(lang, apps=None):
 if (lang == u'en'):
  return {}
 out = frappe.cache().hget(u'lang_full_dict', lang, shared=True)
 if (not out):
  out = {}
  for app in (apps or frappe.get_all_apps(True)):
   path = os.path.join(frappe.get_pymodule_path(app), u'translations', (lang + u'.csv'))
   out.update((get_translation_dict_from_file(path, lang, app) or {}))
  if (u'-' in lang):
   parent = lang.split(u'-')[0]
   parent_out = load_lang(parent)
   parent_out.update(out)
   out = parent_out
  frappe.cache().hset(u'lang_full_dict', lang, out, shared=True)
 return (out or {})

def load_lang ( lang , apps = None ) : if ( lang == u'en' ) : return { } out = frappe . cache ( ) . hget ( u'lang_full_dict' , lang , shared = True ) if ( not out ) : out = { } for app in ( apps or frappe . get_all_apps ( True ) ) : path = os . path . join ( frappe . get_pymodule_path ( app ) , u'translations' , ( lang + u'.csv' ) ) out . update ( ( get_translation_dict_from_file ( path , lang , app ) or { } ) ) if ( u'-' in lang ) : parent = lang . split ( u'-' ) [ 0 ] parent_out = load_lang ( parent ) parent_out . update ( out ) out = parent_out frappe . cache ( ) . hset ( u'lang_full_dict' , lang , out , shared = True ) return ( out or { } )
combine all translations from .