question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Additional suggestions for other language settings

See original GitHub issue

I 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

  1. Code modified in my environment
  2. Run [Diff tModLoader] at [tModLoader Dev setup]
  3. Generated difference patch Should I pull request this?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Chicken-Bonescommented, Jun 12, 2018

External language support as mods is entirely achievable and definitely good idea. We’ll see what we can do.

0reactions
rrryutarocommented, Jun 11, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found