Adding Custom languages translating the addon - MomoxStudios/EnhRaid GitHub Wiki

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! Text when looking at a door
Raiding "You are raiding! "
Participating "You are participating in a raid.
TooFarAway "You are too far away from the raid! Warning text at the right side of the screen
TimeLeft "Time left: %s min
AlreadyRaiding "You are already raiding!
RaidUnavailable "You can't raid this target! Cooldown Message
RaidYourself "You can't raid yourself! Info when trying to raid your own base
RaidGangMembers "You can't raid your own members! Info when trying to raid your own group members
GettingRaided "Someone else is already raiding this target! Message when trying to raid a base which is already being raided
PlayerCooldown "You can't raid here for %s min. Cooldown Message
TeamCooldown "You can't raid for %s min. "
GettingRaided "Someone started to raid you! Info when being raided
SomebodyStartedRaid "Someone started to raid %s. Public Advert
GangStartedRaid "Raid on %s ordered by %s started. Advert for Crew Members
RaidStarted "You started a raid! You can stop it with "/"..raid.config.StopRaidCommand.."". Message for the Boss when starting a new raid
RaidEnded "Raid on %s ended. Advert when a Raid ends
LeftTerritory "Raid cancelled. The raiders went too far away from the raid. "
BossDied "Raid cancelled. The boss died. "
BossArrested "Raid cancelled. The boss got arrested. "
BossAFK "Raid cancelled. The boss went AFK. "
BossChangedTeam "Raid cancelled. The boss changed his job.
BossLeft "Raid cancelled. The boss left us. "
RaidersGone "Raid cancelled. All raiders are dead, arrested or fled. "
StoppedRaid "%s stopped the raid. Advert in case the boss ends a raid
YouStoppedRaid "You stopped the raid. Message for the boss when ending raids
NoRaid "There is no raid to stop! Message when trying to do /stopraid without an ongoing raid
NoLeader "You aren't the leader of this raid! Message when trying to do /stopraid as a crew member
WrongJob "You don't have the right job for 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.