Skip to content

Language files

The texts of the job offer window and some script messages are stored in JSON files in the shared/lang folder of the ares_electrician resource. One file, en.json (English), is included.

Config.Language in config.lua selects the file. The value is the file name without .json:

Config.Language = 'en'

Each file has two sections. Both must be present.

Section Contains
front_end Texts of the interface windows (the job offer window and minigame titles).
back_end Texts of script notifications, errors, job types and general titles.
  1. Open shared/lang/en.json.
  2. Change only the text on the right side of each key.
  3. Save the file.
  4. Restart the resource with restart ares_electrician.
  1. Copy shared/lang/en.json and name the copy after your language, for example shared/lang/fr.json.

  2. Translate the values (the text on the right side). Do not change the keys on the left side.

  3. In config.lua, set the language code to the new file name without .json:

    Config.Language = 'fr'
  4. Restart the resource with restart ares_electrician.

  • Do not rename or remove any key.
  • Keep the file valid JSON: double quotes around keys and texts, a comma after every entry except the last one in a block.
  • Keep %d in job_completed and job_failed. The script replaces it with the payment amount.
  • Save the file as UTF-8 so accented characters show correctly.
  • Keep en.json in the folder. If your language file is missing, has a typo in the language code or contains invalid JSON, the script falls back to English.

This is the job offer window. All keys are used.

Key Default text Where it shows
dispatch_role Dispatch Role label under the dispatcher name.
job_details_title Job Details Title of the details block.
distance_label Distance Label for the distance to the site.
pay_label Pay Label for the pay.
difficulty_label Difficulty Label for the difficulty.
difficulty_easy Easy Difficulty name for easy.
difficulty_medium Medium Difficulty name for medium.
difficulty_hard Hard Difficulty name for hard.
btn_end_job End the job Button that ends the job.
btn_reroll Reroll Button that asks for a different job.
btn_take_job Take the job Button that accepts the job.
dispatcher_default_name Dispatch Center Name of the dispatcher.

The file has no text for the expert difficulty. Sites with difficulty = "expert" still work and keep their pay multiplier.

Key Default text
circuit_panel.title Circuit Panel Repair
circuit_panel.instructions Connect the power lines correctly
wiring.title Wire Repair
wiring.instructions Fix the damaged wiring

These entries are loaded, but the minigame windows do not show them in version 1.2.2. Translating them is harmless.

Key Default text Where it shows
job_title Electrician Job Title of several script notifications. Used.
context Get inside the electrician van to get the job started ! Not shown in 1.2.2.

None of these entries are shown in version 1.2.2. They are loaded and kept for later use.

Key Default text
job_started Electrician job started! Enter your work van to access dispatch.
job_ended Electrician job ended.
job_completed Job completed! Payment: $%d
job_failed Job failed! Partial payment: $%d
no_vehicle Failed to spawn work vehicle! Try again in a moment.
vehicle_spawn_failed Failed to spawn work vehicle! Try again in a moment.
parking_occupied All parking spaces are occupied! Please try again in a moment.
arrived_at_site You have arrived at the job site. Look for electrical panels to repair.

None of these entries are shown in version 1.2.2.

Key Default text
already_on_job You already have an active job!
not_on_job You are not on a job
no_call_active You don't have an active call
config_invalid Invalid configuration
vehicles_destroyed All vehicles destroyed - job terminated
force_ended Job has been force ended

None of these entries are shown in version 1.2.2.

Key Default text
residential_repair Residential Electrical Repair
commercial_maintenance Commercial Maintenance
emergency_callout Emergency Callout
panel_upgrade Panel Upgrade

Texts you cannot change in the language file

Section titled “Texts you cannot change in the language file”

The following texts are part of the script and are not read from the language files in version 1.2.2:

  • The target labels (for example Start Electrician Job and Enter Work Van).
  • The help texts at a site (for example “Press E to repair electrical system”).
  • Most notification messages (job accepted, job completed with payout, lobby messages, minigame result, errors).
  • The ox_lib dispatch menu texts used when Config.menu = 'ox_lib'.

Names that you set in config.lua, such as the job center blip name, the site names and the site descriptions, are plain text. Write them in your own language directly in the config.