Hello , How can i fix gettext issue with this website dellooni.com/ar-jo/ that has wordked correctly on old server
if (Request::isHttpGet('lang')) {
if (Request::getHttpGet('lang') == 'ar-jo')
$language = 'ar_JO';
}else {
$language = 'en_US';
}
putenv("LANG=$language");
setlocale(LC_ALL, $language);
DEFINE('BASE_PATH', __DIR__ . DIRECTORY_SEPARATOR);
$path = BASE_PATH . 'locale';
$domain = 'words'; //this is the default text-domain
bindtextdomain($domain, $path);
// bind_textdomain_codeset($domain, 'UTF-8');
textdomain($domain);
bind_textdomain_codeset($domain, 'UTF-8');
the language files are located in core/locale/ar_JO/LC_MESSAGES words.mo words.po
How can i debug the issue because i think the problem from server not from a code ??
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You debug the issue by talking to your web developer. The server (besides PHP version) is irrelevant.
I have found the answer here :
https://stackoverflow.com/questions/5257519/cant-get-gettext-php-on-ubuntu-working
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.