If you speak a language the Open-AudIT does not currently offer (we offer English, Czech, German, French, Spanish, Brazilian Portuguese and Simplified Chinese) then don't despair!

We provide translation files for these languages, and to make your own file, just copy /usr/local/open-audit/app/Views/lang/en.inc (or for Windows, c:\xampp\open-audit\app\Views\lang\en.inc) to the same folder, giving it a new name (so let's choose jp.inc for Japanese).

Now edit that file and change the text on the right side of each assignment, ie make -

$GLOBALS["lang"]["About"]="About";

Look like:

$GLOBALS["lang"]["About"]="に関しては";

Apologies if the above is wrong, I don't speak Japanese and I used DuckDuckGo Translate...

Anyway, make those changes to all the assignments in your new file.

Now - ideally you would send us your file and we can include support for it "out of the box" - including updating the SQL schema so you can choose this language in your users' preferences.

If you choose not to send us the file or you need the language displayed immediately, you can do this - however, it will change the language for all users of Open-AudIT, not each user. So if one user needs English, but you make this change to Japanese, they're out of luck. And you will need to copy the file every time you upgrade.

With that caveat out of the way, to make the change edit the file /usr/local/open-audit/app/Views/shared/lang.php.

At the top of the file, change it from:

<?php
$langFile = APPPATH . 'Views/lang/en.inc';
if (!empty($user->lang)) {
    $langFile = APPPATH . 'Views/lang/' . $user->lang . '.inc';
}
include($langFile);

to:

<?php
$langFile = APPPATH . 'Views/lang/en.inc';
if (!empty($user->lang)) {
    $langFile = APPPATH . 'Views/lang/' . $user->lang . '.inc';
}
$langFile = APPPATH . 'Views/lang/jp.inc';
include($langFile);

In this case, the jp.inc file for Japanese support.

And you're done!

As I mentioned, it would be better for both you and the product if you could email your new .inc file to support@firstwave.com with a summary saying this is for Open-AudIT and which language it is for. Then we can include it for you and make the dropdown for language choice in the UsersRead template (and database) accept it and you won't need to copy it around every time you upgrade.

I hope this is useful (smile)


  • No labels