Hi,
The process of building a [language-code].phar now seems to be managed from include/cli/modules/i18n.php, in the run() method (https://github.com/osTicket/osTicket/blob/develop/include/cli/modules/i18n.php#L89), which seems a little bit too complex to tinker with for a quick term change.
However, the DataTemplate::__construct() method in include/class.i18n.php (https://github.com/osTicket/osTicket/blob/develop/include/class.i18n.php#L610) seems to say that you can equally put a [language-code].phar file in include/i18n/[language-code].phar OR you can just put the un-phared version of the phar file (a directory) as include/i18n/[language-code]/. There are a number of other code bits that seem to confirm this possibility.
This being said, I had a very hard time trying to modify the existing "fr" language and in the end I decided to make a "locale" variation ("fr_BE" in my case) which ended up working, so here is the full procedure to do just that, without changing any OSTicket code. I'm working on OSTicket 1.18. I use fr.phar as source, and fr_BE as my custom language, so thing about replacing these below. I also use a Linux command line, so the "phar" command is available to me. Not sure how to do it under Windows:
- create a working directory and move into it
- download a language pack from https://osticket.com/download/ (language packs tab)
- phar extract -f [/path/to/downloads/fr.phar]
- if fr.phar is still present, remove it
- this creates a number of files into your download directory
- edit LC_MESSAGES/messages.mo.php, find "Language: fr" and replace with "Language: fr_BE"
- edit MANIFEST.php, find "'Language' => 'fr'," and replace with "'Language' => 'fr_BE',"
- scan all files (grep -r is your friend on the command line, or "find & replace" features) for terms you want to change/improve and do it.
- go down one level and rename your download folder to "fr_BE"
- move this folder to your OSTicket's "include/i18n/" folder
- edit include/i18n/langs.php and copy the block of the language you copied (in my case, "fr") and just add a "flag"=>"BE" (or whatever you decided for a suffix to your language) as a line in this block (look for other "flag" in the file to see how it's done).
- go to your OSTicket's admin panel -> Settings -> System -> System languages. You should see your new language in the list of secondary languages. Add it. Save.
- go to your profile and change your preferred language (Profile -> Dashboard -> Settings -> Localisation -> Preferred language). Save.
Now you should see your modified terms replace the previous ones in the interface. You can now also choose to set this language by default.
To change the language of existing users (agents or users) in one go, you might need to go inside the database and update ost_staff.lang, ost_staff.locale and ost_user__cdata.lang, but that last one I'm not sure how to do (because it contains a number and an escaped string).
Hope this helps some people (even though 10 years after the original request).