Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Month name in local language
-
I use matplotlib.dates.DateFormatter('%b') to display months names, hoping see them in my mother language.
But my code displays them in English.
Thus after searching, I've found the code
locale.set_locale(locale.LC_ALL, 'fr_FR')
print locale.nl_langinfo(locale.LC_MON1)But that does not give me the hoped French "janvier" instead of the English "January"...
Thanks to help me -
Does this do it?
import calendar print([x for x in calendar.month_name])
EDIT: On second thought, perhaps
locale.setlocale(locale.LC_ALL, 'fr_FR')
is a no-op in Pythonista. -
No, the code prints the months names in English.
locale.set_locale(locale.LC_ALL, 'fr_FR') is refused but I found it in Python general help (perhaps not for IOS, I agree)
-
-
Thanks for your so quick answer.
The problem seems to be 2 years old, thus no hope.
Not vital.. (Belgium has more important problems actually) -
Resolved:
ax.set_xticklabels(('...names of months in local language'))