Topic: Language installation

Hi All,

I've just installed FA on a local XAMPP to try it before actual usage.

I need an Arabic front end for one user so I tried to install the AR_EG package from with in FA " Install/Update Languages" - clicking on the disk icon next to "Arabic" but I keep getting: "Could not open".

Then I tried to manually install the language so I copied the ar_eg language files in lang\ar_EG\LC_MESSAGES & pointed to the .mo & .po files correctly in the language form but also didn't work!
I get the RTL orientation but not the translated text!

What is wrong?

Thanks,

WH

Re: Language installation

Hi again,

It has something to do with the XAMPP installation!

I downloaded Server2Go & it is working fine with it!!!

Thanks,

WH

Re: Language installation

Glad that you solved it.
I use WAMP myself without problems.

Joe

Re: Language installation

I did installed WAMP & it is working - But do we know what is needed for XAMPP to work?

Re: Language installation

No, not really. I tried it myself, and it did not work for me. I cannot recall what was wrong. Using WAMP has never caused any problems.

Joe

Re: Language installation

Hi Joe,

Now I'm having another problem with Arabic chars!
I've tried to look for it in the forum but couldn't find any relative post.

We have the description in Arabic & it is displayed right in the "Arabic" interface but some users like to work with the English interface for FA - when they switch to English interface the Arabic descriptions as:
البنك
instead of:
البنك

Is there a way to make the description fields display the right Arabic even with the English interface?

Thanks,

Re: Language installation

A solution is to run the English translation in Utf8 instead of iso-8859-1.

I guess you can change that in the language install /activate.

You may also need to change the mysql setup as well.

Maybe someone can give more advice.

Joe

Re: Language installation

I found an old post about UTF-8 vs ISO support
Is there any changes concerning UTF-8 support while maintaining backward compatibility?

Re: Language installation

No, not that I am aware of. You have to use an utf8 font when printing the reports. Make a search about that. I am not in office at present. So couldn't help you regarding this.

Joe

10 (edited by wh_hsn 04/27/2014 11:42:26 pm)

Re: Language installation

Hi Joe,

I solved the problem by doing the following:

1- downloaded the dejavu font from:
    https://frontaccounting.com/wbt/modules … hp?file=57
     (required in class.pdf.inc  )
    This solved the PDF wrong Arabic characters in English interface
2- changed 'iso-8859-1'   to    'utf-8'    in some files (see below)

Now everything works just fine in both Arabic & English interfaces.

I think these modifications can be applied without breaking the backward compatibility by just using a global setting variable "force_utf-8" which = false by default so that all previous installations work normally & a simple ternary operation (?:)
I'm not a PHP programmer but I think we can do:

this statement in     .\install\index.php:
                            0 => array ('code' => 'C', 'name' => 'English', 'encoding' => 'iso-8859-1'));
can be written as:
                            0 => array ('code' => 'C', 'name' => 'English', 'encoding' => ($force_utf8 ? 'utf-8' : 'iso-8859-1' ) ));

The files are (searching for 'iso-8859-1'):

  .\install\index.php (1 hit)
  .\lang\installed_languages.inc (2 hits)
  .\reporting\includes\class.mail.inc (1 hit)

Thanks,

WH

Re: Language installation

Good that you solved it. I will have a talk with our chief developer, Janusz, regarding this.

/Joe

Re: Language installation

I think another technique is to switch $force_utf8 automatically if the user switch to a utf-8 font.

Or may use another variable $default_encoding & set it to the user selected font encoding & then use that $forced_encoding to set the character encoding in the various parts of FA.

I think this is a common problem for all utf-8 fonts.

Re: Language installation

Hi Joe,

I did a clean install & tried the changes one by one, it appears that the only needed change was in the file:

.\lang\installed_languages.inc

for the default English language definition (or other extra installed languages where the encoding is not utf8)
$installed_languages = array (
  0 =>
  array (
    'code' => 'C',
    'name' => 'English',
    'encoding' => 'utf-8',
    //iso-8859-1',
  ),

Re: Language installation

Hi Wh_shs
In fact, with your post I could solve my problem quickly.
Thanks so much.