Hi,how can I add custom strings to a language-pack?Regards,chriss

Do you mean change existing strings?Or add new ones?To change existing ones you would either make a custom language pack yourself or suggest alternative translations at http://i18n.osticket.com.If you mean add new ones entirely then you cannot at this time with out changing the source files.

OK, thanks, can you hint me, where to add some lines of code to read an additional, lets say "custom_strings.inc"? I guess one could easily define an array of strings => translations and merge this to the actual strings-array?Regards,chris

Nope.  I have never even looked at the code in the language packs and/or how it integrates with the rest of the project.

Just a FYI:

It's planned to make it available to change strings individually in the future with phase 4 of the multi language project. Currently the multi language support is at phase 2 of 4. With individual changes is meant to e.g. change the word "ticket" to "flower". Does not help you right away, but as already said, it's just a FYI ;)

2 years later

here's my solution: in class.translation.php
add this to function load_tables() :

if(file_exists(I18N_DIR .'custom_' .$_SESSION .'.inc')){
      $this->cache_translations += (include I18N_DIR .'custom_' . .'.inc');}

put a custom_.inc file like this into your i18n-directory.
if would be "de":
<?php
$custom_de = array();
$custom_de = 'Nur meine anzeigen';
$custom_de = 'Gesch.';
...
$custom_de = 'Bearbeitet am %s von %s';
$custom_de = '<b>%s</b> erstellt am %s';
return $custom_de;?>

moderator note: re-formated text to be readable (ntozier).

    2 years later

    chriss Could you please explain with more details? what is to be the custom_**.inc file contents, to make appropriate translations?

    Let's say i have landing page with custom text in english - "hello, world", and have 2 other languages installed - UK, RU. As far as I understood, I have to create 2 extra files: custom_UK.inc and custom_RU.inc. What has to be the contents of this two files to have "hello world" translated to , let's say "privit svit"?
    Could you give the customized class.translation.php file as well?
    thanks

    This thread is from 2014.

    Please do not be a necromancer.
    Killing zombie thread with a head shot.

    Write a Reply...