Skip to content

Adding Custom languages translating the addon

Momox (Studios) edited this page Jul 11, 2017 · 4 revisions

Translating the addon is very easy!


1. Step one

** Navigate to "[SERVER]\addons\enhancedraiding\lua\raidsystem\sh_language.lua" and open it up (in Notepad++ or similar software)


2. Finding the Placeholders to translate

The following table contains all the placeholders and a description of them

Name Default Description
PressKey Press "..raid.config.RaidKeyText.." to start a raid! Message when looking at doors to start a raid.
AlreadyRaiding You are raiding!
Participating You are participating in a raid. Message for crew members when a raid starts
TooFarAway You went too far away from the raid! Warning if someone left the area of the raid
RaidUnavailable You can't raid this target for some reason! Very rare error message
RaidYourself You can't raid yourself! If you try to raid your own door/fading door
RaidGangMembers You can't raid members of your gang! If you try to raid a door/fading door of a crew member
PlayerCooldown You can't raid here for the following time: %s. Cooldown Message when looking at the door
TeamCooldown You can't raid for the following time: %s. General Cooldown message
GettingRaided Someone started to raid you! Message if you're being raided
SomebodyStartedRaid Someone started to raid %s. Public advert if a new raid starts
GangStartedRaid Raid on %s ordered by %s started.
RaidStarted You started a raid! You can stop this raid with "/"..raid.config.StopRaidCommand.."". Message for the boss once he starts the raid
RaidEnded Raid on %s ended. Public Advert if the raid ends
LeftTerritory Raid cancelled. Raiders went too far away from the raid.
BossDied Raid cancelled. The boss died. Message if the Boss dies
RaidersDied Raid cancelled. All raiders are dead or arrested. Message if all raiders died/have been arrested
BossLeft Raid cancelled. The boss passed on.
StoppedRaid %s ended the raid. Message when the boss ends the raid
YouStoppedRaid You stopped the raid. Message for the Boss once he ends a raid
NoRaid There is no raid to stop! Message when the crew boss types /stopraid without an ongoing raid
NoLeader You are not the leader of this raid! Message if a crew member (not the boss) tries to end a raid
WrongJob You got the wrong job to do this!

3. Using the scheme, translate all the placeholders

Scheme: raid.AddPhrase("Placeholder", "Text", "Lang")

Here's an explanation of each argument:

Name Meaning Example
Placeholder One of the Placeholders from the list above "GangStartedRaid"
Text What it should be translated with "Raid on %s ordered by %s started."
Lang Which language should be affected by this (english by default) "de" or "fr" or "it" or whatever

That means one correct example would be:

raid.AddPhrase("NoRaid", "Pizza De Pasta", "it")

Do this for every Placeholder you want to translate

Now all you need to do is: Set the language in the config by setting it to the "Lang" parameter you previously define the translations for.

Clone this wiki locally