Have you tried ptBR
?
In the server attributes, ptBR worked!
But the notification translations didn’t work.
I created the folder traccar/templates/notifications/ptBR/ and translated, but it still comes in English.
I even translated something simple in the folder traccar/templates/notifications/en to test, but the change is not applied to the notifications. No matter what I set, they keep coming in English — even after restarting the service.
Which notification channel are we talking about?
And what type of notification?
All notifications and all delivery channels.
For example, I tested ignitionOn and ignitionOff, via web and Telegram.
I changed a single word in the file ignitionOn.vm, but the notification didn’t change.
I even deleted all folders in /home/mbbrasil/traccar/templates/notifications/ and left only the en folder to make sure it was reading from there, then modified something simple — just one word — only for testing. But no change is reflected in the received notification.
Then you're definitely missing something. It must be taking those files from somewhere.
Hello, I had the same problem here. When I created the translation folder, I had named it as /opt/traccar/templates/notifications/pt_BR and configured it in Traccar as ptBR, but it didn’t work. So, I changed the folder name to ptBR (/opt/traccar/templates/notifications/ptBR) and restarted the server, and then it started working perfectly.
After renaming the translation folder to ptBR, I configured the system server option to use the ptBR language.
I managed to solve the problem by doing the following:
I changed the folder from
/opt/traccar/templates/translations/pt_BR.json → /opt/traccar/templates/translations/ptBR.json
And the folder /opt/traccar/templates/notifications/pt_BR → /opt/traccar/templates/notifications/ptBR
Then, in the global server configuration, I set the language to ptBR. The problem was solved this way.
However, on the other server it works without changing the pt_BR.json.
Anyway, that was the fix I found for now, and it’s working fine.
I changed the folder to ptBR.json in translations because the alerts were coming in English. After this change, it worked, and now the alerts are coming in Portuguese correctly.
I also had to change the templates/notifications/pt_BR folder to ptBR, because if I didn’t, the other events would still come in English.
This should fix the problem:
https://github.com/traccar/traccar-web/commit/88f3d855c8b46b7c6457081d82922101868eb5c8
Correct language code to use is pt_BR
.
When will this release be available?
With the next release, but you can also install the preview:
Thanks for it.
What is the correct language abbreviation I should set in the server attributes for Brazilian Portuguese in Traccar 6.9.0?
I tried the following options: pt-br, pt-BR, pt_br, pt_BR, pt-Br, pt_Br, ptbr and ptBr.
None of them worked, and all of them broke Traccar with the following error:
When I set only pt (Portuguese from Portugal) or any other language, it works fine.
I’m facing issues with notifications, which are only coming in English. I created a translation folder inside the notifications folder with all the names I mentioned above, but none of them worked.