I use several languages and I have been adding my own custom translations by decompressing the .phar files / editing the messages.mo.php file for each language.Adding custom translations is easy enough but the odd thing is that once I enable and use a language my server seems to somehow cache it. Any subsequent edits that I make are ignored.In fact, out of desperation I even deleted the messages.mo.php file to see what would happen. osTicket didn't complain about the missing file and kept on serving up the cached translations!I have tried removing the language from osTicket and adding it back. I've tried restarting Apache, clearing my browser's cache, using a different browser, a different computer, a different internet connection, even rebooting the server... nothing will prompt the system to use my replacement terms!So I set up a testing server. It works perfectly. I can make edits to a language and they show up instantly.But I need to sort this out on my working server. I am hoping that someone may have some insight. What the heck?

I've pinged the devs to take a look at this thread. (I dont use languages personally.)

Thanks, @[deleted] Welcome back!

You're welcome.  :)And thanks... but I really want to go back on vacation. :) heheh

Regarding my issue it might be worth mentioning that I do have Intl Extension installed and working.

I have made a custom translation some time ago and had also problems.Especially the messages.mo.php was a troublemaker.In my case simply editing the messages.mo.php does not work. But editing the pot-file, converting it to an mo-file and then compiling it to an php-file with the class.translation.php class (see https://github.com/osTicket/osTicket/blob/develop/setup/doc/i18n.md) in a uncompressed language pack was successfully:https://github.com/osTicket/osTicket/issues/3101Maybe this helps you..

Thank you for your response, @[deleted]The i18n language system is very impressive, but unfortunately it is also very complicated to work with.I wish I had seen that second link ^ sooner... it is very informative. This page helped me a lot.After many hours I have figured out the entire process of taking messages.po to .mo to .mo.php.But no matter what route I take, once I enable a modified language pack on my main server and additional modifications are ignored. :(On my testing server I can simply edit the messages.mo.php file and my modifications show up as soon as I refresh the page. I just tested it again right now before responding to make sure I wasn't going crazy.

Are you using php-fpm? If so you could try to restart it for solving cache issues.

I checked my PHP settings and no, I am running PHP as a FPM application on this account. BUT then I noticed that (for some reason that I can't recall right now) I was using PHP 7.I switched to PHP 5.6 and BAM! I can edit translations on-the-fly now.Check it out:https://screencast-o-matic.com/watch/cFiVrAFTEv Thank you so much for your suggestion, @[deleted] You helped me sort it out. 

Hi @[deleted],In my installation there is something glitchy with how language packs are displayed. The code for the first language is displayed next to the second language, etc. From what I can tell this doesn't seem to result from an error in any specific language pack, as any combination of languages seems to produce the same result.Would you kindly tell me if you're seeing the same thing in our osTicket (Admin Panel > Dashboard > Information)? Cheers!

Glad to hear that you found the issue.What does "The code for the first language is displayed next to the second language, etc." mean?Maybe a screenshot helps me to understand.

Doh! I meant to include the following screenshot in my last message.blank

@[deleted]

That’s to define locales of languages.

Cheers.

@[deleted]

Also your locales are on the wrong lines. They should all be one line up. For example “ar_SA” is Arabic - Saudi Arabia.

Cheers.

@[deleted]That's exactly what I'm saying! :)I'm trying to figure out why it is happening in my installation and I'm starting by asking @[deleted] if the same thing is happening on his end.I take it you haven't seen this before, Kevin?

Let me redefine my earlier message:The code locale for the first language is displayed next to the second language, etc. 

Ok, now I understand.Yes in my installation it also behaves this way (like you describe it):blankI have noticed the displayed text for the language pack changes also a little bit when I change the language from english to german in the ui:blankIt looks like the description text is mixed from different language packs.

Thank you for confirming this, @[deleted] It saves me from thinking it is an issue with my installation due to my mucking about with language packs.I have submitted an issue report regarding this.

Write a Reply...