Table of Contents
Language Files TutorialMultiple Language SupportVilloNanny supports out-of-the-box only a small number of languages (currently italian and english). You can add support for additional languages by simply providing the appropriate configuration file. The “config” directory contains a configuration file for each supported language. Each file is named
where If the language of your Travian server is not supported by your version of VilloNanny, either browse the newsgroups in case someone already posted the file you need, or write one yourself as explained below. When you have the language configuration file in place, you can use it by specifying the 2-letter code in the main configuration file “configuration.xml”, like the following: <server desc="Travian 4" language="de">
where “de” is the two-letter code for the german language, and “lang-de.properties” is the language configuration file to be placed in the “config” directory. Customising an existing Language Configuration FileLanguage Configuration files can be customised by adding “aliases”, which are additional words with the same meaning. Aliases are separated by commas. For example, in the lang-en.properties you can find the following line: key.romans.troop6 = Equites Caesaris If you don't like typing the words “Equites Caesaris” in your configuration.xml file every time you need to call a horse, then you can add one or more aliases, like: key.romans.troop6 = Equites Caesaris, Caesar, Iron Horse You can then use the words “Caesar” or “Iron Horse” instead of “Equites Caesaris”. This comes also useful when your travian site hasn't been properly translated and different words are used for the same concept. For example, if the english server used the word “Cropland” in some pages and “Wheatland” in other pages, then you could fix it with the following line: key.cropland = Cropland, Wheatland This dones't actually happen in english sites, but very often in other languages. Creating a new Language Configuration FileThis example will show how to provide support for the german language. The same principles apply to any other language. Note for non-latin languagesIf you are writing a file for a language containing non-latin characters, like ć, š, ž, щ, и and so on, make sure to save it in the UTF-8 format or VilloNanny will not work. For latin languages this is not needed, but the files we provide are in UTF-8 anyway. Find the language codeGo to the Travian server login page, the one that asks for username and password. Right-click on the page background and choose “View Source” (this is for IE in Windows):
You will see the HTML source code of the page, something like: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Travian de7</title> <meta name="content-language" content="de"> <meta http-equiv="cache-control" content="max-age=0"> <meta http-equiv="imagetoolbar" content="no"> You have to look for the “content-language” meta tag: <meta name="content-language" content="de">
The value of the “content” attribute is the language code you need, “de” in the example. The meta tag can of course be found on any other travian page. Create a new fileCopy the “lang-en.properties” file and name it “lang-de.properties”, so that english values can be replaced with german ones. Just remember to keep an initial comment line, like: # de This will prevent malfunctioning when the file is saved in UTF-8 format (the actual content of the line is not important as long as the # is there). Translate keywordsThe language configuration file has the following syntax: key.<keyword> = <translation>
where key.wood = Lumber “wood” is the keyword and “Lumber” is the translation. You should replace “Lumber” with the translated version. Be aware that you shouldn't just translate with what seems right to you, but you should use the exact word or phrase that is found on the Travian pages. Automatic Translation: LanguageConfigHelperThe LanguageConfigHelper, found in the “tools” directory, is a utility that can help you translate the bulk of travian keywords. It will connect to the travian FAQ in your language and, by comparing it with the english FAQ, it will create keywords for buildings and troops. The FAQ is located at the address http://help.travian./yourDomain/, for example http://help.travian.it or http://help.travian.de. If your server's FAQ is in your language, then you can most probably take advantage of the LanguageConfigHelper. If your FAQ is in english, then the LanguageConfigHelper is useless. Anyway, the best thing to do when in doubt is to run it and check the result. For the german server, the result is the following: # Buildings and Fields key.woodcutter = Holzfäller key.clayPit = Lehmgrube key.ironMine = Eisenmine key.cropland = Getreidefarm key.sawmill = Sägewerk key.brickyard = Lehmbrennerei key.ironFoundry = Eisengießerei key.grainMill = Getreidemühle key.bakery = Bäckerei key.warehouse = Rohstofflager key.granary = Kornspeicher key.blacksmith = Waffenschmiede key.armoury = Rüstungsschmiede key.tournamentSquare = Turnierplatz key.mainBuilding = Hauptgebäude key.rallyPoint = Versammlungsplatz key.marketplace = Marktplatz key.embassy = Botschaft key.barracks = Kaserne key.stable = Stall key.workshop = Werkstatt key.academy = Akademie key.cranny = Versteck key.cityHall = Rathaus key.residence = Residenz key.palace = Palast key.treasureChamber = Schatzkammer key.tradeOffice = Handelskontor key.greatBarrack = Große Kaserne key.greatStable = Großer Stall key.cityWall = Stadtmauer key.earthWall = Erdwall key.palisade = Palisade key.stonemason = Steinmetz key.brewery = Brauerei key.trapper = Fallensteller key.herosMansion = Heldenhof key.greatWarehouse = Großes Rohstofflager key.greatGranary = Großer Kornspeicher key.wonderOfTheWorld = Weltwunder # Troops key.romans.troop1 = Legionär key.romans.troop2 = Prätorianer key.romans.troop3 = Imperianer key.romans.troop4 = Equites Legati key.romans.troop5 = Equites Imperatoris key.romans.troop6 = Equites Caesaris key.romans.troop7 = Ramme key.romans.troop8 = Feuerkatapult key.romans.troop9 = Senator key.romans.troop10 = Siedler key.gauls.troop1 = Phalanx key.gauls.troop2 = Schwertkämpfer key.gauls.troop3 = Späher key.gauls.troop4 = Theutates Blitz key.gauls.troop5 = Druidenreiter key.gauls.troop6 = Haeduaner key.gauls.troop7 = Ramme key.gauls.troop8 = Kriegskatapult key.gauls.troop9 = Häuptling key.gauls.troop10 = Siedler key.teutons.troop1 = Keulenschwinger key.teutons.troop2 = Speerkämpfer key.teutons.troop3 = Axtkämpfer key.teutons.troop4 = Kundschafter key.teutons.troop5 = Paladin key.teutons.troop6 = Teutonenreiter key.teutons.troop7 = Ramme key.teutons.troop8 = Katapult key.teutons.troop9 = Stammesführer key.teutons.troop10 = Siedler AliasesWhen defining keywords for troops, you can add any number of additional translations to use as nicknames or aliases. For example, if you don't want to always write “Keulenschwinger” when referring to the first type of teuton troop, you might add the “K” alias: key.teutons.troop1 = Keulenschwinger, K Manual TranslationWhen writing a new language configuration file you should provide a translation for all keywords, using the “lang-en.properties” file as a reference. Some of the keywords might be translated with the LanguageConfigHelper as explained above, but you will still have to translate some other keywords manually. We will now show some examples of manual translations. key.wood, key.clay, key.iron, key.crop Since version 2.2.4 these keywords aren't used anymore. You can skip them. They have been kept in this tutorial just as an example The translation for these keywords is found on the main village page, as the following image shows for the german server:
The configuration file will become: key.wood = Holz key.clay = Lehm key.iron = Eisen key.crop = Getreide key.food Since version 2.2.4 this keyword isn't used anymore. You can skip it. The translation for this keyword is found in the tooltip that appears while hovering with the mouse over the “crop consumption”icon, as shown in the following image:
The tranlsation is therefore: key.food = Getreideverbrauch key.woodfield, key.clayfield, key.ironfield, key.cropfield, key.level These translations are found by hovering with the mouse over the village fields, one for each type. The following image shows what appears on the german server:
The first word is the translation for that type of field, while the second word is the translation for “level”. key.woodfield = Holzfäller key.clayfield = Lehmgrube key.ironfield = Eisenmine key.cropfield = Getreidefarm key.level = Stufe key.mainBuilding, key.emptySite The translation for key.mainBuilding can be found either by hovering on the main building or by clicking on it:
key.mainBuilding = Hauptgebäude You can also find this translation in the tutorial on buildings. The translation for key.emptySite can be found by hovering on an empty spot. key.emptySite = Bauplatz key.cranny To find the translation for the cranny, either try to build one or look it up in the tutorial:
key.cranny = Versteck key.foodShortage The translation for this keyword can be found by trying to build anything while the crop consumption is too high. You will get a message like the following:
The translation is whatever comes before the colon: key.foodShortage = Nahrungsmangel key.tribe, key.romans, key.gauls, key.teutons The tribe keyword can be found in the profile:
key.tribe = Volk The translation for tribes can be found in many places, for example in the instructions popup:
key.romans = Römer key.gauls = Gallier key.teutons = Germanen key.random This keyword is used by the Farmizzator when you are attacking with catapults and don't specify any target. It is an optional language keyword because you don't always need it and in any case VilloNanny will try to guess it from the web page when it is not defined in the configuration. We don't have a german account with catapults, so we can't provide the translation for this. You should type what you read when selecting a random target for your catapults, which should be the first item in the drop-down box. This is an example for the italian server, where the translation is “A caso”:
key.movement.reinforcement, key.movement.normal, key.movement.raid, key.movement.spy.resources, key.movement.spy.defenses These keywords have been introduced in version 2.2.4 The value of these keywords is totally free. They are used by the Farmizzator to specify the kind of troop movement. You can put any value that makes sense to you, or leave the english values as you please. Just be sure that when you configure the Farmizzator strategy, you use the values written here. I don't know any german so I'll use some online service to find example values. Germans can laugh at me at will. key.movement.reinforcement = verstärken key.movement.normal = Angriff key.movement.raid = Überfall key.movement.spy.resources = Quelle key.movement.spy.defenses = Verteidigung Complete german fileThe lang-de.properties file that we created in this example is therefore the following: # de key.wood = Holz key.clay = Lehm key.iron = Eisen key.crop = Getreide key.food = Getreideverbrauch key.foodShortage = Nahrungsmangel # Buildings and Fields key.woodcutter = Holzfäller key.clayPit = Lehmgrube key.ironMine = Eisenmine key.cropland = Getreidefarm key.sawmill = Sägewerk key.brickyard = Lehmbrennerei key.ironFoundry = Eisengießerei key.grainMill = Getreidemühle key.bakery = Bäckerei key.warehouse = Rohstofflager key.granary = Kornspeicher key.blacksmith = Waffenschmiede key.armoury = Rüstungsschmiede key.tournamentSquare = Turnierplatz key.mainBuilding = Hauptgebäude key.rallyPoint = Versammlungsplatz key.marketplace = Marktplatz key.embassy = Botschaft key.barracks = Kaserne key.stable = Stall key.workshop = Werkstatt key.academy = Akademie key.cranny = Versteck key.cityHall = Rathaus key.residence = Residenz key.palace = Palast key.treasureChamber = Schatzkammer key.tradeOffice = Handelskontor key.greatBarrack = Große Kaserne key.greatStable = Großer Stall key.cityWall = Stadtmauer key.earthWall = Erdwall key.palisade = Palisade key.stonemason = Steinmetz key.brewery = Brauerei key.trapper = Fallensteller key.herosMansion = Heldenhof key.greatWarehouse = Großes Rohstofflager key.greatGranary = Großer Kornspeicher key.wonderOfTheWorld = Weltwunder # Troops key.romans.troop1 = Legionär key.romans.troop2 = Prätorianer key.romans.troop3 = Imperianer key.romans.troop4 = Equites Legati key.romans.troop5 = Equites Imperatoris key.romans.troop6 = Equites Caesaris key.romans.troop7 = Ramme key.romans.troop8 = Feuerkatapult key.romans.troop9 = Senator key.romans.troop10 = Siedler key.gauls.troop1 = Phalanx key.gauls.troop2 = Schwertkämpfer key.gauls.troop3 = Späher key.gauls.troop4 = Theutates Blitz key.gauls.troop5 = Druidenreiter key.gauls.troop6 = Haeduaner key.gauls.troop7 = Ramme key.gauls.troop8 = Kriegskatapult key.gauls.troop9 = Häuptling key.gauls.troop10 = Siedler key.teutons.troop1 = Keulenschwinger key.teutons.troop2 = Speerkämpfer key.teutons.troop3 = Axtkämpfer key.teutons.troop4 = Kundschafter key.teutons.troop5 = Paladin key.teutons.troop6 = Teutonenreiter key.teutons.troop7 = Ramme key.teutons.troop8 = Katapult key.teutons.troop9 = Stammesführer key.teutons.troop10 = Siedler # Troop movement (use any values you like) key.movement.reinforcement = verstärken key.movement.normal = Angriff key.movement.raid = Überfall key.movement.spy.resources = Quelle key.movement.spy.defenses = Verteidigung # Catapult random target # We don't know about this. Any help? # key.random = Random # Tribes key.tribe = Volk key.romans = Römer key.gauls = Gallier key.teutons = Germanen # Other keywords key.emptySite = Bauplatz key.level = Stufe Future extensionsThe language files will eventually be extended as the functionality of VilloNanny grows over time. This tutorial will most probably become outdated, but the principles will always apply and you will be able to create a new language configuration file with just a bit of clever guessing by copying from the existing files. |
![]() |