Translations
This commit is contained in:
parent
4c3e35d1fc
commit
b79e87c7ca
30 changed files with 279 additions and 101 deletions
14
gui/main_menu/language_button.gd
Normal file
14
gui/main_menu/language_button.gd
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue