Purpose

To install language files which represent the language/accounting requirements of different Countries/Locations

Procedure

  1. Download the appropriate Language file from the Sourceforge Downloads page: http://sourceforge.net/projects/frontaccounting/files/ and extract.
  2. Log on to your Frontaccounting installation as admin using Training Company. Go to Setup>Install/Update Languages.
  3. Enter a Language Code (eg Eng_CAN ), Language Name and Encoding. Encoding can usually be found using Firefox by loading the .po file from your language folder into Firefox and going to View>Character Encoding
  4. Browse for the .po and .mo files in the folder you extracted. Make any other selections as needed.
  5. Click Save to upload the files to your server
  6. If the language file you require doesn't exist on the Sourceforge server you can create your own .po and .mo files using Poedit as indicated here: http://frontaccounting.com/wb3/pages/download/download-languages.php Simply use Poedit to alter an existing .po language file where you wish to change it and save to your new language folder. Then update the language as above. In Windows, the program C:\Program Files\Poedit\bin\msgunfmt.exe can be used to revert a compiled .mo file back into a .po file to be edited and then re-compiled using C:\Program Files\Poedit\bin\msgfmt.exe. The command msgunfmt.exe -o en_US.po en_US.mo in a DOS box does the reversion.

Default contents of lang/installed_languages.inc

<?php

/* How to make new entries here for non-packaged languages:

-- 'code' should match the name of the directory for the language under \lang
.-- 'name' is the name that will be displayed in the language selection list (in Users and Display Setup)
-- 'rtl' only needs to be set for right-to-left languages like Arabic and Hebrew
-- 'encoding' used in translation file
-- 'version' always set to '' for manually installed languages.
-- 'path' installation path related to FA root (e.g. 'lang/en_US').
*/


$installed_languages = array (
  0 => 
  array (
    'code' => 'C',
    'name' => 'English',
    'encoding' => 'iso-8859-1',
  ),
);

$dflt_lang = 'C';
?>

Tips and Tricks


Entering data in different languages without changing the language of FrontAccounting

If you need to accept foreign characters you must either set your language charset to utf-8 or the appropriate iso-8859-X, where the X is a number representing your language. This way the html is stamped with the charset used.

  1. Go to the Setup tab in FrontAccounting as an admin.
  2. Enter Install/Update Languages and change the encoding for the en_GB (US) language to utf-8 or iso-8859-X where x is the number representing your language. This will create utf-8 html pages.
  3. Then you must install a unicode font, otherwise creating PDF's will throw an error.
* Download: Dejavu Font and install.
* Unpack and move the files to /reporting/fonts folder.
* If you use this font, please change the font name in /reporting/includes/class.pdf.inc file about line 90. As of 2.2 this was not required, it was present in the file already.
* If you use the font FreeSans, please change the font name in /reporting/includes/class.pdf.inc file about line 159. As of 2.3 this was not required, it was present in the file already.

Changing language of FA

lang/installed_languages.inc file contains the encoding type - change it to be UTF-8 like:

# 'encoding' => 'iso-8859-1',
    'encoding' => 'utf-8', 

The resulting PDF files will be quite heavy.

On a linux machine, locale -a would show the languages available. If a certain Spanish encoding like es_EC does not appear in the list and we need it, then sudo locale-gen es_EC would generate it and possibly prevent oversized PDF files.

If locale -a does not show the languages necessary, then run the command dpkg-reconfigure locales and choose the locales generated that are needed. Now, locale -a would show the languages available. It is assumed that the dependancy debconf has been installed.