avatar davidm Pro Feb 16. 2009. 5:43 am
Just installed aC 2.0 beta local, everything went smooth except for one thing : the 1.1.x translation is not there anymore.

I understand the translation system is different with a XML file instead of the previous localization folder with module.xxx.php files.
But given the amount of work done, how do I import the existing translation into the new system ?

Also, I don't remember which folder I have to make writeable to create a translation file, I have a "Cannot create translation file" error when I try to generate a language file from the dictionnary.

Thanks !
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar Ilija Studen Staff Feb 16. 2009. 5:59 am
Translation system is the same as before, just move from /activecollab folder into /custom to avoid situation where you can by accident overwrite localization folder when upgrading. XML is added as format for easy import / export, but translation files are still in PHP (no need to parse them on each request).

There is a known issue with translation files not being loaded properly in activeCollab 2.0 beta. To work around these issues, open Language.class.php in /activecollab/application/modules/system/models/langauges and make sure that loadTranslations() method works like this:

/**
 * Load translations into given array
 *
 * @param string $locale
 * @return null
 */
function loadTranslations($locale) {
  $files = $this->getTranslationFiles();
        
  if(is_foreachable($files)) {
    foreach ($files as $file) {
      $GLOBALS['current_locale_translations'][$locale] = array_merge($GLOBALS['current_locale_translations'][$locale], (array) Languages::getTranslation($this, $file));
    } // foreach
  } // if
} // loadTranslations


Please let me know how it went.
avatar davidm Pro Feb 16. 2009. 6:08 am
Thanks a lot for the quick answer, will check that after lunch and get back to you :)
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar davidm Pro Feb 16. 2009. 6:53 am
Right on the money I've modified Language.class.php as instructed and it works like a charm :))

Thanks !
Now I can work on completing french translation for 2.0 :)
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar Ilija Studen Staff Feb 16. 2009. 7:01 am
Glad to hear it's working. I've updated upgrade instructions so it now tells you where you should move your translation and the fix posted above will be part of the next beta release.