Reputation: 505
When I call setlocale(LC_ALL, "ar_SA"), it returns "C". Even I'm expecting it returns "ar_SA". If setlocale(LC_ALL, "ar_SA") is successful, it'll return "ar_SA".
I found the reason. There is no "ar_SA" locale directory in /usr/share/locale of my Mac OSX system.
I'm using gettext function. I should change the locale to "ar_SA".
Thank you.
Upvotes: 0
Views: 793
Reputation: 505
I just copied en_US locale directory to ar_SA locale directory to make ar_SA locale.
Obviously fake ar_SA doesn't work. It works same as en_US.
But I can set locale to ar_SA.
This is a workaround I found.
Upvotes: -4