Difference between revisions of "Custom Language Strings"

From Armagetron
m
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
 
In Armagetron Advanced it is possible to customize the language strings used on your server. Every message text sent from the server has an associated base entry in a language template. The primary purpose for these language templates is to offer localizations in many languages, but you can create your own template to provide modified language strings.
 
In Armagetron Advanced it is possible to customize the language strings used on your server. Every message text sent from the server has an associated base entry in a language template. The primary purpose for these language templates is to offer localizations in many languages, but you can create your own template to provide modified language strings.
 
One popular method for modifying the default language strings is to manually edit the game-provided template, such as english_base.txt. You should '''not''' do this. When you upgrade Armagetron Armagetron your modifications will be lost. The correct method is to create a new custom language file.
 
  
 
== Creating a Custom Language File ==
 
== Creating a Custom Language File ==
  
In the <code>user data directory</code> of your server create a directory named <code>language</code>, and place a file named <code>custom.txt</code> inside it.
+
In the [[Configuration Files|user data directory]] of your server create a directory named <code>language</code>, and place a file named <code>custom.txt</code> inside it.
  
Put the following text in <code>language/custom.txt</code> (only the first line is required):
+
Put the following text in <code>language/custom.txt</code>:
  
 
<pre>language Custom
 
<pre>language Custom
  
# An example custom language string
+
# Here is an example of a custom language string. Look in english_base.txt, or
 +
# one of the other language files, to find more messages to customize.
 +
 
 
player_entered_game \1 0x7fff7fentered this server with custom language strings.\n</pre>
 
player_entered_game \1 0x7fff7fentered this server with custom language strings.\n</pre>
  
 
== Using Your Custom Language ==
 
== Using Your Custom Language ==
  
In your server configuration use the following settings.
+
Edit your configuration to include this setting:
 +
 
 +
<pre>LANGUAGE_FIRST Custom</pre>
 +
 
 +
If your server used a language other than English, then you should set <code>LANGUAGE_SECOND</code> with your base preferred language. For example, if you would like to use Spanish then your configuration would be:
  
 
<pre>LANGUAGE_FIRST Custom
 
<pre>LANGUAGE_FIRST Custom
LANGUAGE_SECOND American English # or whatever your preference is</pre>
+
LANGUAGE_SECOND Spanish</pre>
 +
 
 +
== The Alternative Solution (Difficult to Maintain) ==
 +
 
 +
One popular method for modifying the default language strings is to manually edit the game-provided template, such as english_base.txt. You should '''not''' do this. When you upgrade Armagetron Advanced your modifications will be lost.
 +
 
 +
The best method is to create a custom language file.

Revision as of 15:48, 24 July 2012

In Armagetron Advanced it is possible to customize the language strings used on your server. Every message text sent from the server has an associated base entry in a language template. The primary purpose for these language templates is to offer localizations in many languages, but you can create your own template to provide modified language strings.

Creating a Custom Language File

In the user data directory of your server create a directory named language, and place a file named custom.txt inside it.

Put the following text in language/custom.txt:

language Custom

# Here is an example of a custom language string. Look in english_base.txt, or
# one of the other language files, to find more messages to customize.

player_entered_game	\1 0x7fff7fentered this server with custom language strings.\n

Using Your Custom Language

Edit your configuration to include this setting:

LANGUAGE_FIRST Custom

If your server used a language other than English, then you should set LANGUAGE_SECOND with your base preferred language. For example, if you would like to use Spanish then your configuration would be:

LANGUAGE_FIRST Custom
LANGUAGE_SECOND Spanish

The Alternative Solution (Difficult to Maintain)

One popular method for modifying the default language strings is to manually edit the game-provided template, such as english_base.txt. You should not do this. When you upgrade Armagetron Advanced your modifications will be lost.

The best method is to create a custom language file.