You can translate template files.
In this case the template doesn't help.
This is what is in the template: Alarm: $position.getString("alarm")
It does help. You can write expression to map alarm key to a translated word or phrase.
Could you tell us where this mapping expression should go?
It should go in place of the code that you showed.
in case of "powercut" alarm, could you show an example how could it be?
Something like this:
#{if}($position.getString("alarm").equals("powercut"))LOCALISED POWER CUT#{else}OTHER ALARM#{end}
Hello,
i want to tie in the post because i want to evaluate more conditions to translate more alarm types.
For example:
#{if}($position.getString("alarm").equals("powercut"))LOCALISED POWER CUT
#{else if}($position.getString("alarm").equals("sos"))SOS BUTTON WAS PUSHED!!!
#{else}OTHER ALARM#{end}
When i entered this syntax,
following message was sent:
LOCALISED POWER CUT# #{else if}(false)SOS BUTTON WAS PUSHED!!!
How can i solve this problem?
Thanks in advance!
Did you manage to solve how to translate multiple alarms?
Hello Santiago,
sorry for my late answer.
I am sorry to say that i did not solve the problem yet.
I hoped to get some help here on the forum.
Here is the solution how to get multiple translations to alarms:
#{elseif}($position.getString("alarm").equals("sos"))SOS BUTTON WAS PUSHED!!!
#{else}OTHER ALARM#{end}```
The else if condition has to be written without space.
```{elseif}``` is the right writing.
hi Anton. i have devices that uses gt06 and gps103 protocols
how can i translate or change name alarm events that is sending by sms and email for example
"shock" "door" "powerCut" "poweroff" "poweron" ?? it seems that default names cant be changed, nevertheless the other alarms could translate to spanish.