Translations

This commit is contained in:
Rendo 2025-12-17 16:59:21 +05:00
commit b79e87c7ca
30 changed files with 279 additions and 101 deletions

View file

@ -0,0 +1,14 @@
extends MenuButton
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var popup: PopupMenu = get_popup()
for locale in TranslationServer.get_loaded_locales():
popup.add_item(locale)
popup.index_pressed.connect(on_locale_selected)
func on_locale_selected(index: int):
var popup: PopupMenu = get_popup()
ClientSettings.LOCALE = popup.get_item_text(index)