koubem1 wrote:
Hello all,
I have the same problem like you, but in administrator web interface. I translated messages.po to Czech. I made a directory in a2billing/lib/locale/cs_CZ/LC_MESSAGES and here I located my translated messages.po and rewrote "Content-Type: text/plain; charset=utf-8\n". Then I used command msgfmt messages.po and it created messages.mo. It looked fine. I opened languageSettings.php in a2billing/lib and change it:
<?php
function SetLocalLanguage()
{
$slectedLanguage = "";
$languageEncoding = "";
$charEncoding = "";
switch (LANGUAGE)
{
case "czech":
$languageEncoding = "cs.UTF-8";
$slectedLanguage = "cs_CZ";
$charEncoding = "UTF-8";
break;
case "english":
$languageEncoding = "en.UTF-8";
$slectedLanguage = "en_US";
$charEncoding = "UTF-8";
break;
default:
$languageEncoding = "cs.UTF-8";
$slectedLanguage = "cs_CZ";
$charEncoding = "UTF-8";
break;
}
/*
Code here to set the Encoding of the Lanuages and its Envirnoment Variables
*/
//print($languageEncoding);
@setlocale(LC_MESSAGES,$languageEncoding);
putenv("LANG=$slectedLanguage");
putenv("LANGUAGE=$slectedLanguage");
setlocale(LC_MESSAGES, $slectedLanguage);
$domain = 'messages';
bindtextdomain("messages", realpath("../lib/locale"));
textdomain($domain);
//bind_textdomain_codeset($charEncoding);
define('CHARSET', $charEncoding);
}
?>
Then I restarted apache: service apache2 restart. After it I logged to A2Billing and add to link ?lang=cs -nothing, ?lang=cs_CZ -nothing, ?language=czech also nothing. I could change everything without efects!!!
OK, so I rewrite original english messages.po by my translated messages.po. At first it looked good, but I didnt see specialy czech letters!!! I really dont know how do it. I rewrote messages.po to messages.htm and this new file opened in my browser. Every letters looks fine. But I need this file in A2Billing. Could me anybody help please?
Thank you
hello!
I did the same for
es_CL but nothing happen, what can i do?
koubem1? did you solve it?
thanks in advance