How did you change other alarms?
In folder: /opt/traccar/templates/short#
Edit files .vm
Ignition, Device Moving is OK.
But alarm vibration and powercut not found
It sounds like you changed non-alarm events. What about other alarms?
I only have these two alarms
In alarm.vm edited (alarm to alarme)
But in push notification the message is: ALARME: vibration / ALARME: powercut
vibration and powercut I couldn't change the language
The problem only happens in push notification
how to insert image here?
Well, you probably have to translate the alarm keys in the alarm.vm template.
$device.name ALARME: $position.getString("alarm") at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)
I edited only the word ALARME.
I don't know how to do the next steps
You can find documentation here:
Thank you very much
Hello Sergio,
I have same need...do you manage to solve it?...please share how you do it please.
I couldn't change. I couldn't change. If you can, please let us know.
You can change language using two methods.
1.- changing the template using velocity documentation
2- creating new alarms with the language that you want and using them.
I’ve used the second method and it’s working fine.
For the first one, if you search across the forum, you will find a full example.
Regards
Hello,
Well, i will post my version of method 1, for spanish language:
Dispositivo: $device.name
Alarma: #{if}($position.getString("alarm").equals("powercut"))CORTE DE CORRIENTE!!!
#{elseif}($position.getString("alarm").equals("sos"))BOTÓN SOS PULSADO!!!
#{elseif}($position.getString("alarm").equals("general"))ALARMA GENERAL!!!
#{elseif}($position.getString("alarm").equals("vibration"))VIBRACIÓN!!!
#{elseif}($position.getString("alarm").equals("movement"))MOVIMIENTO!!!
#{elseif}($position.getString("alarm").equals("fallDown"))CAÍDA!!!
#{elseif}($position.getString("alarm").equals("lowBattery"))BATERÍA BAJA!!!
#{elseif}($position.getString("alarm").equals("tampering"))MANIPULACIÓN!!!
#{elseif}($position.getString("alarm").equals("removing"))DESCONEXIÓN!!!
#{elseif}($position.getString("alarm").equals("shock"))GOLPE!!!
#{elseif}($position.getString("alarm").equals("powerRestored"))CORRIENTE REESTABLECIDA!!!
#{elseif}($position.getString("alarm").equals("accident"))ACCIDENTE!!!
#{elseif}($position.getString("alarm").equals("lowPower"))BATERÍA BAJA!!!
#{elseif}($position.getString("alarm").equals("lowspeed"))VELOCIDAD MUY BAJA!!!
#{elseif}($position.getString("alarm").equals("overspeed"))VELOCIDAD EXCESIVA!!!
#{elseif}($position.getString("alarm").equals("gpsAntennaCut"))CORTE DE ANTENA GPS!!!
#{elseif}($position.getString("alarm").equals("tow"))REMOLQUE!!!
#{elseif}($position.getString("alarm").equals("hardAcceleration"))ACELERACIÓN EXCESIVA!!!
#{elseif}($position.getString("alarm").equals("hardBraking"))FRENADO EXCESIVO!!!
#{elseif}($position.getString("alarm").equals("hardCornering"))TUMBADO EXCESIVO!!!
#{elseif}($position.getString("alarm").equals("jamming"))INTERFERENCIA SEÑAL!!!
#{elseif}($position.getString("alarm").equals("idle"))RALENTÍ EXCESIVO!!!
#{elseif}($position.getString("alarm").equals("gpsAntennaCut"))CORTE SEÑAL GPS!!!
#{elseif}($position.getString("alarm").equals("geofence"))GEOCERCA!!!
#{elseif}($position.getString("alarm").equals("geofenceEnter"))ENTRADA GEOCERCA!!!
#{elseif}($position.getString("alarm").equals("geofenceExit"))SALIDA GEOCERCA!!!
#{elseif}($position.getString("alarm").equals("parking"))PARKING!!!
#{elseif}($position.getString("alarm").equals("fault"))FALLO!!!
#{elseif}($position.getString("alarm").equals("unlock"))DESBLOQUEADO!!!
#{elseif}($position.getString("alarm").equals("lock"))BLOQUEADO!!!
#{elseif}($position.getString("alarm").equals("door"))PUERTA!!!
#{elseif}($position.getString("alarm").equals("powerOn"))ENCENDIDO!!!
#{elseif}($position.getString("alarm").equals("powerOff"))APAGADO!!!
#{elseif}($position.getString("alarm").equals("fuelLeak"))DRENAJE DE COMBUSTIBLE!!!
#{elseif}($position.getString("alarm").equals("footBrake"))FRENO DE PIE!!!
#{elseif}($position.getString("alarm").equals("bonnet"))CAPÓ!!!
#{elseif}($position.getString("alarm").equals("temperature"))TEMPERATURA!!!
#{elseif}($position.getString("alarm").equals("fatigueDriving"))CONDUCCIÓN FATIGOSA!!!
#{elseif}($position.getString("alarm").equals("laneChange"))CAMBIO DE CARRIL!!!
#{elseif}($position.getString("alarm").equals("highRpm"))ALTAS REVOLUCIONES!!!
#{else}$position.getString("alarm")
#{end}
Batería: $position.getDouble("power") V.
Nivel Batería Tracker: $position.getDouble("battery") V.
Cuando: $dateTool.format("dd-MM-YYY HH:mm:ss", $event.eventTime, $locale, $timezone)
Enlace Traccar: $webUrl?eventId=$event.id
Enlace Google Maps: https://www.google.com/maps/place/$position.latitude°+$position.longitude
In the TEMPLATE folder I changed the language of push notification of all messages, but vibration and continuous powercut alarms in English. Where is it possible to change the language of these alarms?
v4.10
Thanks