Search code examples
phpinternationalizationgettext

gettext or font issue?


I have just moved a website from one host to another and I am having an issue with displaying other languages. It was working perfectly on the old server but I'm not sure where to start looking for the problem.

The Problem!

As you can see the fonts display fine in the select box but not in the main page. I am using a font I have used many times before and never had issues with it.

Any suggestions on were to start looking for the problem?


Solution

  • OK found the solution on another website not sure why but on this new server I needed an extra piece of code to make gettext work correctly.

    bind_textdomain_codeset($domain, 'UTF-8'); 
    

    Previously I only had,

    bindtextdomain($domain, "Locale");
    textdomain($domain);
    

    but for some reason this new server required the extra line? For interest's sake if anyone can explain the difference I would love to hear.