Additional suggestions for other language settings
See original GitHub issueI am using Google translation because I can not speak English.
Description
Suggestion.
I want to add language setting.
If you add “Other” to the end of the language menu and select Other, you want to acquire the Terraria.Localization.Content. *
File on the Main.SavePath
and read it think.
My main purpose is to use it in Japanese, but I think that it will be possible to customize each json file freely by this method.
Code example
[Terraria.Main.cs]
protected void DrawMenu(GameTime gameTime)
:
array9[10] = Language.GetTextValue("Language.Other");
num5 = 11;
:
array9[10] = Language.GetTextValue("Language.Other");
array9[11] = Lang.menu[5].Value;
num5 = 12;
[Terraria.Localization.GameCulture.cs]
public static readonly GameCulture Other = new GameCulture("ja-JP", 10);
[Terraria.Localization.LanguageManager.cs]
private void LoadFilesForCulture(GameCulture culture)
{
string[] languageFilesForCulture = this.GetLanguageFilesForCulture(culture);
string[] array = languageFilesForCulture;
if (array.Length == 0)
{
try
{
Directory.GetFiles(Main.SavePath, "Terraria.Localization.Content.*")
.ToList().ForEach(path => this.LoadLanguageFromFileText(File.ReadAllText(path)));
}
catch (Exception) { }
}
else
{
:
[Terraria.Localization.Content.en-US.Main.json.patch]
"Language": {
:
"Other": "Other"
},
About contents of pull request
- Code modified in my environment
- Run [Diff tModLoader] at [tModLoader Dev setup]
- Generated difference patch Should I pull request this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Change your language on the web - Computer
Click Select. If you understand multiple languages, click + Add another language. After you change your language preferences, close and reopen your browser....
Read more >Change your display language on Google - Android
Open the Google app Google Search . · At the top right, tap your Profile icon. · Tap Settings Settings and then Language...
Read more >Add an editing or authoring language or set ...
Select File > Options > Language. Under Office display language, on the Set the Office Language Preferences, select Install additional display languages from ......
Read more >Check spelling and grammar in a different language
Set the proofing language to check spelling in different languages within a single document. Get suggestions in different languages with Editor.
Read more >How to Change the Proofing Language in Microsoft Word
The proofing language is used to spell-check your document and offer grammar suggestions. Plus, the bonus section at the end shows what to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
External language support as mods is entirely achievable and definitely good idea. We’ll see what we can do.
We do not consider including font files in tModLoader. A modder that provides custom languages is supposed to create Mod as usual and place Json files of languages and font files if necessary, such as when loading Mod. When placing a font file, it is also assumed that it is necessary to back up the original file and also to restore the original if Mod is removed.
For creating font files, we created the following GUI tools. https://github.com/rrryutaro/DynamicSpriteFontGenerator
For Japanese people, JSON files and font files for Japanese will be prepared and will be provided at Mod which will copy these.