def format_default_translations_config(additional_languages):
 if (not additional_languages):
  return SAMPLE_CONF[u'TRANSLATIONS']
 lang_paths = [u'    DEFAULT_LANG: "",']
 for lang in sorted(additional_languages):
  lang_paths.append(u'    "{0}": "./{0}",'.format(lang))
 return u'{{\n{0}\n}}'.format(u'\n'.join(lang_paths))

def format_default_translations_config ( additional_languages ) : if ( not additional_languages ) : return SAMPLE_CONF [ u'TRANSLATIONS' ] lang_paths = [ u'    DEFAULT_LANG: "",' ] for lang in sorted ( additional_languages ) : lang_paths . append ( u'    "{0}": "./{0}",' . format ( lang ) ) return u'{{\n{0}\n}}' . format ( u'\n' . join ( lang_paths ) )
adapt translations setting for all additional languages .