[horde] Problem with Translation [SOLVED]

sbasurto at soft-gator.com sbasurto at soft-gator.com
Wed Jun 26 18:43:07 UTC 2013


On Wed, 2013-06-26 at 12:36 -0600, Michael M Slusarz wrote:

> Quoting sbasurto at soft-gator.com:
> 
> > I want to share my struggle with Horde translation, I install Horde as
> > instructions in Horde Site, I read carefully the Translation Guide also,
> > but the translation did not work for me. Until today that I debug Horde
> > application an finally find that in the file Registry.php located
> > at /usr/share/php/Horde/ in the function setLanguage is a variable
> > called $lang_charset and this variable had HARDCODED 'UTF-8', so if one
> > of your locales is for example "es_ES.iso88591" it won't work
> 
> And that's correct.  Horde *REQUIRES* UTF-8 internally.
> 
> michael
> 
> ___________________________________
> Michael Slusarz [slusarz at horde.org]
> 

I understand, the thing is that if I did not debug the application, I
would not be able to use Translation because in no place of Horde
Documentation mention that. So If I have a locale "es_ES.iso88591" I can
not use translation?.

Besides I change the line and everything works well. 


So there are two workarounds one is replace the line with the one works
for you, in my case:
$lang_charset = $lang . '.iso88591';

or install your locale with UTF-8 support.

I just change that line an everything is working right. I do not know if
is the best way to workaround this but this works for me. I guess a
better way to do it, could be:

exec("locale -a",$locale);
$lang_charset = "";
foreach($locale as $key => $value){
        if(!strstr($value,$lang.'.')){
                ; //do nothign
        }else{
                $lang_charset = $value; 
        }
}

which is the right way to workaround this?

Sergio.

 


More information about the horde mailing list