def write_translations_file(app, lang, full_dict=None, app_messages=None):
 if (not app_messages):
  app_messages = get_messages_for_app(app)
 if (not app_messages):
  return
 tpath = frappe.get_pymodule_path(app, u'translations')
 frappe.create_folder(tpath)
 write_csv_file(os.path.join(tpath, (lang + u'.csv')), app_messages, (full_dict or get_full_dict(lang)))

def write_translations_file ( app , lang , full_dict = None , app_messages = None ) : if ( not app_messages ) : app_messages = get_messages_for_app ( app ) if ( not app_messages ) : return tpath = frappe . get_pymodule_path ( app , u'translations' ) frappe . create_folder ( tpath ) write_csv_file ( os . path . join ( tpath , ( lang + u'.csv' ) ) , app_messages , ( full_dict or get_full_dict ( lang ) ) )
write a translation file for a given language .