I need to get translated month names to provided language. Is there any correct way or good practice to get localized month names in python 3.X? Language i will get from request
def get_localized_month(num: int, lang: str = "ru") -> str:
months = {
1: {
"en": "January",
"ru": "Январь",
"others": "Январь",
},
2: {
"en": "February",
"ru": "Февраль",
"others": "Февраль",
},
}
return months[num][lan]