Topic: Internalization
Hi,
I'm planning to use Tracmor at work, but I need it in french.
So i've started to modify the code to use QI18n from the Qcodo framework.
As a proof-of-concept i've tried to translate the Asset page's shortcuts menu :
- In includes/data_classes/Shortcut.class.php :
public function __toString() {
return sprintf('%s', QApplication::Translate($this->strShortDescription));
- I've created a fr.po file in includes/qcodo/i18n with the translations
- I've set up language and country settings in includes/prepend.inc.php
(near the end of file)
if (QApplication::$LanguageCode)
QI18n::Initialize();
else {
QApplication::$CountryCode = 'fr';
QApplication::$LanguageCode = 'fr';
QI18n::Initialize();
}
- Hit reload on my browser and ... IT WORKS !!
I will continue to internationalize strings in tracmor code, but i wish to contribute back my changes, how can I do ?
Greetings,
Olivier ROCH VILATO