I'm using PHP's gettext
tool to translate a multilingual web app. It works fine on my local server, but not when hosting.
My directory structure for the locale .po and .mo messages
locale/
ar_IQ/
LC_MESSAGES/
messages.mo
messages.po
ku_IQ/
LC_MESSAGES/
messages.mo
messages.po
and my php code to set the locale
// get $locale from URL parameter or cookie
putenv("LC_ALL=$locale");
setlocale(LC_ALL, $locale);
bindtextdomain("messages", "/locale");
textdomain("messages");
bind_textdomain_codeset('messages', 'UTF-8');
When changing locale to ar_IQ it works fine, but with ku_IQ the texts aren't translated at all.
I know there might not be a locale for ku_IQ
on my hosting provider's servers, but shouldn't it still get the translated texts from the proper folder (i.e. ku_IQ)? Only date, time and other regional formats wouldn't work in that case.