Line 5: |
Line 5: |
| ==For translators== | | ==For translators== |
| ===How translations work=== | | ===How translations work=== |
− | Each mod has an <tt>i18n</tt> folder containing the translation files (if it supports translation), which you can open in a normal text editor like Notepad. The folder always has a <tt>default.json</tt> (which has the default English text), plus any of these files: | + | Each mod has an <samp>i18n</samp> folder containing the translation files (if it supports translation), which you can open in a normal text editor like Notepad. The folder always has a <samp>default.json</samp> (which has the default English text), plus any of these files: |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
Line 13: |
Line 13: |
| |- | | |- |
| | Chinese | | | Chinese |
− | | <tt>zh.json</tt> | + | | <samp>zh.json</samp> |
| |- | | |- |
| | French | | | French |
− | | <tt>fr.json</tt> | + | | <samp>fr.json</samp> |
| |- | | |- |
| | German | | | German |
− | | <tt>de.json</tt> | + | | <samp>de.json</samp> |
| |- | | |- |
| | Hungarian | | | Hungarian |
− | | <tt>hu.json</tt> | + | | <samp>hu.json</samp> |
| |- | | |- |
| | Italian | | | Italian |
− | | <tt>it.json</tt> | + | | <samp>it.json</samp> |
| |- | | |- |
| | Japanese | | | Japanese |
− | | <tt>ja.json</tt> | + | | <samp>ja.json</samp> |
| |- | | |- |
| | Korean | | | Korean |
− | | <tt>ko.json</tt> | + | | <samp>ko.json</samp> |
| |- | | |- |
| | Portuguese | | | Portuguese |
− | | <tt>pt.json</tt> | + | | <samp>pt.json</samp> |
| |- | | |- |
| | Russian | | | Russian |
− | | <tt>ru.json</tt> | + | | <samp>ru.json</samp> |
| |- | | |- |
| | Spanish | | | Spanish |
− | | <tt>es.json</tt> | + | | <samp>es.json</samp> |
| |- | | |- |
| | Turkish | | | Turkish |
− | | <tt>tr.json</tt> | + | | <samp>tr.json</samp> |
| |- | | |- |
| | custom languages | | | custom languages |
− | | {{SMAPI upcoming|3.13.0|''file name matches the language's <tt>LanguageCode</tt> field''}}
| + | | ''file name matches the language's <samp>LanguageCode</samp> field'' |
| |} | | |} |
| | | |
Line 63: |
Line 63: |
| ===How to translate a mod=== | | ===How to translate a mod=== |
| # Install the mod normally. | | # Install the mod normally. |
− | # Open the file you want to edit in its <tt>i18n</tt> folder. (If the file doesn't exist for your language yet, just copy <tt>default.json</tt> and rename it.) | + | # Open the file you want to edit in its <samp>i18n</samp> folder. (If the file doesn't exist for your language yet, just copy <samp>default.json</samp> and rename it.) |
| # Edit the translations as needed (see ''[[#How translations work|how translations work]]'' above). | | # Edit the translations as needed (see ''[[#How translations work|how translations work]]'' above). |
| # Launch the game and choose your language. The mod should show the translation text you entered. | | # Launch the game and choose your language. The mod should show the translation text you entered. |
Line 71: |
Line 71: |
| * If you see broken symbols in-game, try saving the translation file with UTF-8 encoding. | | * If you see broken symbols in-game, try saving the translation file with UTF-8 encoding. |
| * You can test translation changes in-game without restarting the game. Enter <code>reload_i18n</code> into the SMAPI console to reload translations. (If a mod internally cached a translation, it may not be updated.) | | * You can test translation changes in-game without restarting the game. Enter <code>reload_i18n</code> into the SMAPI console to reload translations. (If a mod internally cached a translation, it may not be updated.) |
| + | * There's an [https://www.nexusmods.com/stardewvalley/mods/21317 Internationalization] mod in development that aims to simplify the translation process. In particular updating existing translations. It replaces steps 2-4 above. If you install that and run the game, you can open a page in your web browser to update translations of your installed mods live. It takes care of the json & utf-8 encoding so you don't have to. It's very new, so it might still have bugs. |
| | | |
| ===How to provide mod translations=== | | ===How to provide mod translations=== |
Line 91: |
Line 92: |
| ===Using translations=== | | ===Using translations=== |
| For help using translations, see [[Modding:Modder Guide/APIs/Translation]]. | | For help using translations, see [[Modding:Modder Guide/APIs/Translation]]. |
| + | |
| + | ===Translation summary=== |
| + | If your mod is [[Modding:Open source|open-source]], you can add a translation summary to your repository's <samp>README.md</samp> file ([https://github.com/Pathoschild/StardewMods/#translating-the-mods see an example]). This makes it much more likely that translators will contribute translations for your mod since it... |
| + | * indicates that contributions are welcome; |
| + | * explains how to provide translations; |
| + | * and provides a summary of each mod's translation status and links. |
| + | |
| + | You can [https://gist.github.com/Pathoschild/040ff6c8dc863ed2a7a828aa04447033 auto-generate the translation summary using a script]. |
| | | |
| ===Request translations=== | | ===Request translations=== |
| <ol> | | <ol> |
| <li>Before you start: | | <li>Before you start: |
− | # Your mod '''must''' be open-source on a public site like [https://github.com/ GitHub].<br />''This is important for the modders curating the request list, since it lets them (a) check the current status of your mod translations to keep requests up-to-date, (b) answer questions from translators if needed, and (c) submit a pull request with any translations received when the ticket is closed if you stop responding.'' | + | # Your mod '''must''' be [[Modding:Open source|open-source]] on a public site like [https://github.com/ GitHub].<br />''This is important for the modders curating the request list, since it lets them (a) check the current status of your mod translations to keep requests up-to-date, (b) answer questions from translators if needed, and (c) submit a pull request with any translations received when the ticket is closed if you stop responding.'' |
− | # If you have partial translations, copy any missing translations into all translation files and mark them with <code>// TODO</code>. (That way translators only need to look at their language's file, they don't need to compare it with <tt>default.json</tt>.) | + | # If you have partial translations, copy any missing translations into all translation files and mark them with <code>// TODO</code>. (That way translators only need to look at their language's file, they don't need to compare it with <samp>default.json</samp>.) |
| # Make sure you watch the request and you have time to reply to questions! Your request will be closed if you don't respond to a question on the ticket within 72 hours. | | # Make sure you watch the request and you have time to reply to questions! Your request will be closed if you don't respond to a question on the ticket within 72 hours. |
− | # The <tt>default.json</tt> must be complete and in English. If your main language isn't English and you need help preparing it, we can help! Just create a request the same way below, but choose <code>needs: English copyediting</code> as the label instead. | + | # The <samp>default.json</samp> must be complete and in English. If your main language isn't English and you need help preparing it, we can help! Just create a request the same way below, but choose <code>needs: English copyediting</code> as the label instead. |
| </li> | | </li> |
| | | |
Line 124: |
Line 133: |
| <li>Watch your notifications so you know when someone contributes translations or answers a question!</li> | | <li>Watch your notifications so you know when someone contributes translations or answers a question!</li> |
| </ol> | | </ol> |
| + | |
| + | ==See also== |
| + | * [[Modding:Custom languages]] |
| | | |
| [[Category:Modding]] | | [[Category:Modding]] |