문제

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".

  1. How can I install "ar_SA" locale directory into my Mac?
  2. Does Mac system in arabic country include arabic locale directory like /usr/share/locale/ar_*?
  3. Is there any work around?

Thank you.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top