Format dates in full month format: [Month Name] [YEAR] I use:
format(Sys.Date(),"%B %Y")
Now I would do the same, but in Arabic:
loc <- Sys.getlocale("LC_TIME")
Sys.setlocale("LC_TIME","Arabic")
format(Sys.Date(),"%B %Y")
Sys.setlocale("LC_TIME",loc)
The Arab months are not replaced by the words "????". I do not think this is a print / Unicode issue, since Arabic is displayed correctly in the console:
"مرحبا "
[1] "مرحبا "
Invoked internally strptimefor formatting, from ?strptime:
Local conversions to and from character strings are used where appropriate and available
I think that strptimedoes not have the correct translation in Arabic. If so, where can I contribute to fix this?
change
AS . , /.
, Ubuntu, -pack-ar
Sys.setlocale("LC_TIME", "ar_AE.utf8");
format(Sys.Date(),"%B %Y")
[1] "يوليو 2015"
.
Windows, ( → ..) .