Difference between revisions of "Translation"

From TerraFirmaCraft Plus Wiki
Jump to: navigation, search
(.lang File)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{stub}}
 
  
 
Translation of Terrafirmacraft+ into other languages is possible. It can be done through the use and modification of lang files.  
 
Translation of Terrafirmacraft+ into other languages is possible. It can be done through the use and modification of lang files.  
Line 5: Line 4:
 
== .lang File ==
 
== .lang File ==
  
The .lang file is a file that specifies the localization for all the text in the game. It can be found in the mod's .jar file. There is one lang file for each language. It is named according to the language and the country it localizes the mod for (e.g. en_US for american english, en_CA for canadian english and so on).
+
.lang files are text files that specify the translations for all the text in the game. They can be found within the mod's .jar file. There is one .lang file for each language, which is named according to the language code which it translates the game to. For example, en_US specifies the localization for American English.
  
To extract the lang file, open the mod's .jar file with a data archiving program (such as WinRar or WinZip). The lang files can be found in the "lang" folder, which is itself contained within the "assets" folder. The folder structure inside the .jar file should look like this: "TerraFirmaCraftPlus-VersionNumber/assets/terrafirmacraftplus/lang". Once the lang file has been found, it needs to be extracted to be worked on.
+
To extract the .lang file, open the mod's .jar file with an archive extraction program, such as WinRar or WinZip. The .lang files can be found within the "/assets/terrafirmacraftplus/lang" folder. The .lang file for the language you intend to translate can then be extracted.
 +
 
 +
=== Format of the .lang file ===
 +
 
 +
The .lang file is a list of all the text in the game, and is split into multiple categories of texts. The translation of these texts is specified after the equals sign. For example, <code>gui.Date=椰棗</code> means that the Date Palm's translation in Traditional Chinese is "椰棗".
 +
 
 +
Comments can be specified by adding a # before the comment.  
  
 
== Translating ==
 
== Translating ==
  
A text editor such as Notepad++ is needed to translate the lang files.
+
A text editor such as Notepad++ is needed to edit, and therefore translate, the entries within the lang files.
  
If the mod had already been translated for a particular language but the translation needs to be updated one needs to extract the relevant lang file and add the new, missing entries in the localization. These entries can be found in the english lang file.
+
If the mod has already been translated to a particular language, but the translation has to be updated, extract the relevant .lang file from the Terrafirmacraft Classic .jar (opening the .jar as if it was a .zip), and add the new, missing entries in the localization. These entries can be found within the English .lang file.
  
If the mod had never been translated for a particular language then it is necessary to create a new lang file for that particular language. To do so, simply copy any of the english lang files (en_US, en_GB or en_CA) and rename it according to the language and country it is meant to translate for (eg naming it it_IT for italian, es_ES for spanish et cetera). After that, it's just a matter of translating the different entries within the lang file.
+
If the mod has never been translated to a particular language, a new .lang file can be created by copying one of the English .lang files (for example, en_US), and renaming it to the language code of the intended language (for example, it_IT for Italian, and es_ES for Spanish). Once the .lang file has been created, the different entries can then be translated.
  
Once the translation is finished, the lang file can be submitted.
+
Once the translation is finished, the .lang file can be submitted to the developer for inclusion in the game.
  
 
== Submitting ==   
 
== Submitting ==   
  
Submissions should be done through the mod's discord, and the developer should be told about new/updated translations when they are submitted. Translations need to be reviewed by other two speakers of that particular language before the developer approves them.
+
Submissions should be done on the TFC+ Discord. The developer should be told about new or updated translations when they are submitted. Translations have to be reviewed by two other speakers of the language before the developer will approve them. Approval can be done by adding a comment line (starting with #), with the username of the person who is approving the translation.
 +
 
 +
== Language Status ==
 +
 
 +
Below are the translations that have been updated for Terrafirmacraft+ from their Terrafirmacraft Classic originals.
 +
 
 +
This table documents the translations that have been updated to Terrafirmacraft+ from their Terrafirmacraft Classic translations. Terrafirmacraft Classic translations do not translate the text added to the game by Terrafirmacraft+.
 +
 
 +
{| class="wikitable"
 +
! Language Code
 +
! colspan=2 | Language
 +
! Translators
 +
! Approvals
 +
|-
 +
| ja_JP
 +
| Japanese
 +
| 日本語
 +
| Sakakiasa, いわし_(Sardine)
 +
| いわし_(Sardine)
 +
|-
 +
| zh_TW
 +
| Traditional Chinese
 +
| 繁體中文
 +
| Sakakiasa
 +
| Mount2010
 +
|-
 +
| ru_RU
 +
| Russian
 +
| русский
 +
| Muurr
 +
| Foundation Jelly, Nirokam
 +
|-
 +
| zh_CN
 +
| Simplified Chinese
 +
| 简体中文
 +
| Hanlie
 +
| Mount2010, Sakakiasa
 +
|}
  
 +
{{Guides}}
 
{{Blocks}}
 
{{Blocks}}

Latest revision as of 21:27, 11 October 2020

Translation of Terrafirmacraft+ into other languages is possible. It can be done through the use and modification of lang files.

.lang File

.lang files are text files that specify the translations for all the text in the game. They can be found within the mod's .jar file. There is one .lang file for each language, which is named according to the language code which it translates the game to. For example, en_US specifies the localization for American English.

To extract the .lang file, open the mod's .jar file with an archive extraction program, such as WinRar or WinZip. The .lang files can be found within the "/assets/terrafirmacraftplus/lang" folder. The .lang file for the language you intend to translate can then be extracted.

Format of the .lang file

The .lang file is a list of all the text in the game, and is split into multiple categories of texts. The translation of these texts is specified after the equals sign. For example, gui.Date=椰棗 means that the Date Palm's translation in Traditional Chinese is "椰棗".

Comments can be specified by adding a # before the comment.

Translating

A text editor such as Notepad++ is needed to edit, and therefore translate, the entries within the lang files.

If the mod has already been translated to a particular language, but the translation has to be updated, extract the relevant .lang file from the Terrafirmacraft Classic .jar (opening the .jar as if it was a .zip), and add the new, missing entries in the localization. These entries can be found within the English .lang file.

If the mod has never been translated to a particular language, a new .lang file can be created by copying one of the English .lang files (for example, en_US), and renaming it to the language code of the intended language (for example, it_IT for Italian, and es_ES for Spanish). Once the .lang file has been created, the different entries can then be translated.

Once the translation is finished, the .lang file can be submitted to the developer for inclusion in the game.

Submitting

Submissions should be done on the TFC+ Discord. The developer should be told about new or updated translations when they are submitted. Translations have to be reviewed by two other speakers of the language before the developer will approve them. Approval can be done by adding a comment line (starting with #), with the username of the person who is approving the translation.

Language Status

Below are the translations that have been updated for Terrafirmacraft+ from their Terrafirmacraft Classic originals.

This table documents the translations that have been updated to Terrafirmacraft+ from their Terrafirmacraft Classic translations. Terrafirmacraft Classic translations do not translate the text added to the game by Terrafirmacraft+.

Language Code Language Translators Approvals
ja_JP Japanese 日本語 Sakakiasa, いわし_(Sardine) いわし_(Sardine)
zh_TW Traditional Chinese 繁體中文 Sakakiasa Mount2010
ru_RU Russian русский Muurr Foundation Jelly, Nirokam
zh_CN Simplified Chinese 简体中文 Hanlie Mount2010, Sakakiasa