Mechanized Assault & eXploration Reloaded



#1 Oct 12, 2007 4:22 pm
JCK Offline
Developer
Registered since: Jan 09, 2006
Posts: 54


Subject: MAX, Reloaded can support language selection now
English:
MAXR can support language selection now! You can choose your prefered language. I have "completed" the functions to read so called language packs. There will be some minor changes to validate a language pack and to insert missing entries (see below), but the main part - reading a pack and using it - is done. And here begins your task: I can only speak German and English. If you need a different language you have to translate the English master language pack into the desired one. It is not difficult, but it is a little bit work to do. And due to the fact that MAX Reloaded is not yet finished :rolleyes: the content of a language pack will increase by time. So you have to maintain your language packevery now and then.

Deutsch
MAXR unterstützt nun die Auswahl von Sprachen. Man kann seine bevorzugte Sprache auswählen. Ich habe die Funktionen um ein so genanntes Sprachpaket auszulesen "fertig". Es wird noch kleiner Änderungen geben bezüglich des Überprüfens und hinzufügens von Einträgen (siehe unten), aber der Hauptteil - einlesen und benutzen - ist fertig. Und hier fängt Eure Aufgabe an: Ich kann nur deutsch und englisch. Wenn jemand eine andere Sprache benötigt, müßt Ihr das englische "Master" Sprachpaket in die gewünschte Sprache übersetzen. Es ist nicht schwierig, aber es ist ein bisschen mit Arbeit verbunden. Und weil MAX Reloaded not nicht fertig ist :rolleyes: wird der Inhalt eines Sprachpakets mit der Zeit anwachsen. Deshalb müßt Ihr Eurer Sprachpaket ab und zu warten.

Layout of a language pack / Aufbau eines Sprachpakets

You can copy/paste it into a text file and rename it to lang_ger.xml
If you made it right, you can open it with your browser. Your browser can validate it, too.

Man kann es Kopieren/Einfügen und als lang_ger.xml abspeichern.
Wenn Du es richtig gemacht hast, kannst Du es mit Deinem Browser öffnen. Dein Browser kann es dann auch überprüfen.

DownloadSource code (Text):
  1. <?xml version="1.0" encoding="iso-8859-15"?>
  2. <!-- * encoding is needed for selecting the correct code table               -->
  3. <!--       iso-8859-5  : Cyrillic languages                                  -->
  4. <!--       iso-8859-15 : western European languages                          -->
  5. <!-- * The English attributes are not needed. They are not interpreted.      -->
  6. <!-- * The "%s" is a placeholder for another part of the text.               -->
  7. <!-- * "\n" indicates a new line. The game will add additinal line feeds, if -->
  8. <!--   they are needed.                                                      -->
  9. <!-- * All other line feeds within a text block will be replaced by a single -->
  10. <!--   blank.                                                                -->
  11. <MAX_Language_File lang="ger" encoding="iso-8859-15" direction="left-to-right">
  12.   <Header>
  13.     <Author name="JCK">
  14.       <Editor name="JCK" time="2007-09-30 13:04:00"/>
  15.       <Editor name="Someone" time="2007-09-30 13:05:00"/>
  16.     </Author>
  17.     <Game_Version time="2007-09-30 13:04:00"/>
  18.   </Header>
  19.   <Text>
  20.     <Main>
  21.       <Game_Title ENG="M.A.X." localized="M.A.X."/>
  22.       <Game_Subtitle ENG="Mechanized Assault and Exploration (TM)" localized="Mechanized Assault and Exploration (TM)"/>
  23.       <Version ENG="version v%s" localized="Version V%s"/>
  24.       <Credits_MM ENG="Michael Mönch's M.A.X. (Original by Interplay)" localized="Michael Mönchs M.A.X. (Original von Interplay)"/>
  25.       <Credits_Doc ENG="Michael Mönch's M.A.X. (Remake by DoctorDeath)" localized="Michael Mönchs M.A.X. (Remake von DoctorDeath)"/>
  26.       <Remarks>
  27.         <Not_yet_implemented ENG="(*) not yet implemented" localized="(*) noch nicht eingebaut"/>
  28.       </Remarks>
  29.     </Main>
  30.     <Initialisation>
  31.     </Initialisation>
  32.     <Menu_Main>
  33.       <Title_Main_Menu ENG="Main Menu" localized="Hauptmenü"/>
  34.       <Button_Single_Player ENG="Single Player" localized="Einzelspieler"/>
  35.       <Button_Multi_Player ENG="Multi Player" localized="Mehrspieler"/>
  36.       <Button_Map_Editor ENG="Map-Editor (*)" localized="Karten Editor (*)"/>
  37.       <Button_Credits ENG="Credits (*)" localized="Credits (*)"/>
  38.       <Button_Exit ENG="Exit" localized="Beenden"/>
  39.     </Menu_Main>
  40.     <Error_Messages>
  41.       <ERROR_File_Not_Found ENG="File not found: %s" localized="Datei nicht gefunden: %s"/>
  42.       <ERROR_Missing_Translation ENG="missing translation: %s" localized="fehlende Übersetzung: %s"/>
  43.       <INFO_Language_initialised ENG="Language is now initialised" localized="Sprachpaket ist jetzt initialisiert"/>
  44.     </Error_Messages>
  45.   </Text>
  46.   <Graphic>
  47.     <More_To_Come/>
  48.   </Graphic>
  49.   <Speech>
  50.     <More_To_Come/>
  51.   </Speech>
  52. </MAX_Language_File>
To translate a language pack you only have to change the text after the key word localized. You have to change the entry lang="ger" to your language code and you should add a row like one of <Editor name=.../>. The other entries are for special tweaks and not so important. At the end you have to rename the language pack to match the language code. Maybe I will be able provide an actual English master pack in the next days.

Um ein Sprachpaket zu übersetzen muss man nur den Text nach dem Schlüsselwort localized übersetzen. Es muss außerdem der Eintrag lang="ger" dem Sprachcode angepasst werden und man sollte eine Reihe wie <Editor name=.../> hinzufügen. Die anderen Einträge sind für besondere Einstellungen und nicht so wichtig. Am Ende muss man noch das Sprachpaket dem Sprachcode entsprechend umbenennen. Vielleciht kann ich in den nächsten Tage schon das englische "Master" Sprachpaket zur Verfügung stellen.
Chris
"Der Tapfere hält im Kampfe inne, wenn sein Gegner strauchelt." -- Laotse
↑  ↓

#2 Oct 13, 2007 7:15 pm
beko beko Offline
Developer, Administrator
Registered since: Jun 04, 2004
Posts: 2,279


Subject: MAX, Reloaded can support language selection now
Ich habe mich heute ein wenig der Übersetzungen gewidmet und Teile der Initialisierung übersetzt. Klappte ganz gut, nachdem ich raus hatte, dass es die Node für den Text unbedingt auch im englischen Master-Paket geben muss.
Bernd Kosmahl
"Sir, we are surrounded!" - "Great - we can attack in any direction."
↑  ↓

#3 Apr 02, 2008 9:46 pm
beko beko Offline
Developer, Administrator
Registered since: Jun 04, 2004
Posts: 2,279


Subject: Re: MAX, Reloaded can support language selection now
This article is aged. Please refer to Writing translations for maxr instead!
Bernd Kosmahl
"Sir, we are surrounded!" - "Great - we can attack in any direction."
↑  ↓

Pages (1): 1


All times are GMT +01:00. Current time: 2:14 pm.