Constants.py (view raw)
1localization = {
2 'us': {
3 'welcome' : "Welcome to PILuAnimeBot!",
4 'sauce' : "[Sauce 🍝]({})",
5 'no_caption' : "No caption detected.",
6 'lewd_toggle' : "Lewd content was {} for this chat.",
7 'enabled' : "enabled",
8 'disabled' : "disabled",
9 'unknown' : "Sorry, I didn't understand that command.",
10 'error': "Something bad happened. Please retry.",
11 }
12}
13
14
15def get_localized_string(text, lang='us'):
16 try:
17 return localization[lang][text]
18 except KeyError:
19 logging.error("No text was found.")
20 return "localization error {}{}{}{}{}{}"