diff --git a/syncplay/messages.py b/syncplay/messages.py index 5eebe31..a674c5a 100644 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -4,4 +4,13 @@ en = { messages = { "en": en - } \ No newline at end of file + } + +def getMessage(locale, type_): + if(messages.has_key(locale)): + if(messages[locale].has_key(type_)): + return messages[locale][type_] + elif(messages["en"].has_key(type_)): + return messages["en"][type_] + else: + raise KeyError() \ No newline at end of file