GithubHelp home page GithubHelp logo

Text inside DialogueLabel doesn't updates with TranslationServer.set_locale("") if I change "Default CSV Locale" about godot_dialogue_manager HOT 3 CLOSED

cortrano avatar cortrano commented on June 24, 2024
Text inside DialogueLabel doesn't updates with TranslationServer.set_locale("") if I change "Default CSV Locale"

from godot_dialogue_manager.

Comments (3)

nathanhoad avatar nathanhoad commented on June 24, 2024

Have you added all of the auto-generated .translation files to the project (under the Localization tab in Project Settings)?

from godot_dialogue_manager.

cortrano avatar cortrano commented on June 24, 2024

Have you added all of the auto-generated .translation files to the project (under the Localization tab in Project Settings)?

Yes. The point is that translation works inside the node, but to see that translation happend you have to scroll to the next line of dialogue. And if the default locale is "en", then you don’t have to scroll to the next line of dialogue and text translates instantly.

Here is simple project that reproduces bug. You should launch dialogue file and press F and G to switch between languages.
test.zip

from godot_dialogue_manager.

nathanhoad avatar nathanhoad commented on June 24, 2024

I'll look at adding something like that to the example balloon but for now you can add this to yours and it should be fine:

func _notification(what: int) -> void:
	# Detect a change of locale and update the current dialogue line to show the new language
	if what == NOTIFICATION_TRANSLATION_CHANGED:
		self.dialogue_line = await resource.get_next_dialogue_line(dialogue_line.id)
		dialogue_label.skip_typing()

The line needs to be fetched again to account for any variables that might need to be resolved.

from godot_dialogue_manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.