Skip to content

Commit

Permalink
getting single localized value provided. #2
Browse files Browse the repository at this point in the history
  • Loading branch information
o3bvv committed May 21, 2013
1 parent 2e43b98 commit bca7739
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xlivesettings/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def config_get(group, key):
log.debug('SettingNotSet: %s.%s', group, key)
raise

def config_get_localized(group, key, lang_code):
"""Get a localized configuration setting"""
return dict(config_get(group, key).value)[lang_code]

def config_get_group(group):
return ConfigurationSettings()[group]

Expand Down

0 comments on commit bca7739

Please sign in to comment.