• AMX Guide Home
  • Step 1: Installing AMX
  • Step 2: Enabling AMX
  • Step 3: Configuring AMX
  • AMX by File:
    • amx.cfg
    • mysql.cfg
    • clcmds.ini
    • cmds.ini
    • configs.ini
    • cvars.ini
    • maps.ini
    • modules.ini
    • paths.ini
    • plugins.ini
    • speech.ini
    • users.ini
  • AMX by Topic:
    • Creating Admins
    • Commands Guide
    • Plugin Installation
    • Plugin Compiling
    • Module Setup
    • Menu Use
    • Language Setup
    • Language Install
    • Weapon Restriction
    • Stats Setup
    • Custom Map Configs
  • Misc. Resources
  • Credit
AMX Mod 2005v1.0 Setup Guide
Half-Life server administration

Adding Languages

AMX Mod comes with three languages: English, French and German. If you feel like you could become a translator, just let us know ;-).

A. File format

Translations data files are located in the addons\amx\lang folder. They are specific to each plugin (this way there can be no conflict). Here is what they look like:

; Translations file for My Test Plugin (test.txt)

; I want to test the inclusion!
+ "test2"

; Let's translate its title first :)
"My Test Plugin"
fr:"Mon Plugin Test"

"Hi, %s!^nThis is the %dth time you come on this server!"
fr:"Salut, %s!^nC'est la %de fois que tu viens sur ce serveur!"

"Players on server:^t%d/%d"
fr:"Joueurs sur le serveur:^t%d/%d"

"- displays the number of players"
fr:"- affiche le nombre de joueurs"

Thanks to this example you can guess several things:

  • lines beginning with a semi-column ';' are comments
  • files can include other ones with a '+'
  • plugin names and command helps can be translated
  • strings can contain the same formatting codes as in AMX plugins (^n, ^t)

B. Adding Languages

Well, basically you just have to add your code:"Translation" lines to the translations files.

But if you plan to give your language support to other people, it might be a good idea to create your own .txt file, in which you'll keep only the English strings and then add your translations. Then other users can include (with the '+') your file instead of overwriting the default one. Moreover, it will let them include several additional languages.

It might be better with an example: let's see the following file.

tailor.txt:
"My tailor is rich"
fr:"Mon tailleur est riche"

You want to add German. You could just do:

tailor.txt:
"My tailor is rich"
fr:"Mon tailleur est riche"
de:"Mein Schneider ist reich"

But adding this to the default file is not recommended: what would happen if somebody else provided people with his own Spanish translations added to the default file? Users who'd want to add both German and Spanish support would have to merge the two files.

Instead of this, it's better to create your own translations file:

tailor_de.txt:
"My tailor is rich"
de:"Mein Schneider ist reich"

Then people who want to use your translations will just have to add one line to their default file:

tailor.txt:
; Include German translations
; (can be specified anywhere in the file)
+ "tailor_de"

; Default translations
"My tailor is rich"
fr:"Mon tailleur est riche"

Half-Life is a registered trademark of VALVe Software and Sierra
AMX Mod was created by OLO and is not affiliated with VALVe.