+3 votes

Hi, I know how to set the code translation of the text depending on the detected language (http://docs.godotengine.org/en/latest/tutorials/asset_pipeline/importing_translations.html), but I have a problem with display UTF-8, which in Polish, Russian or Japanese language. Engine does not automatically select font files.

Ps. How set in Godot the default language of the application for test language display?

in Engine by (207 points)

1 Answer

+2 votes
Best answer

Import a suitable font.Enable unicode when importing.
Add font to Settings -> Editor Settings : Global/Font, Text Editor/Font.
Restart Editor.
Change controls font to imported one.

Maybe you can use Remap to change fonts automatically.
Also you can use TranslationServer's methods get_locale and set_locale to get/set locale and load fonts based on it:

var loc = TranslationServer.get_locale()
if loc == "en" :
    print("Locale is en")
    var fnt = load("res://en.fnt")
    get_node("button_start").add_font_override("font", fnt)
by (62 points)
selected by

I was concerned about changing the fonts in the application not in the editor, depending on the detected language.

I update my answer.

Is works ;) THX

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.