Working on translation context
This commit is contained in:
@@ -39,6 +39,14 @@ func _init() -> void:
|
||||
var preferred = OS.get_locale()
|
||||
self.setLocaleFromLocaleString(preferred)
|
||||
|
||||
func _enter_tree() -> void:
|
||||
# Test
|
||||
print("Hello World!")
|
||||
|
||||
var ctx = TransContext.new()
|
||||
ctx.addContext("item", ITEM.getItem(Item.Type.POTION).getTranslationContext())
|
||||
print(ctx.translate("test"))
|
||||
|
||||
func setLocaleFromLocaleString(localeString:String) -> void:
|
||||
var parts:PackedStringArray = localeString.split("_")
|
||||
|
||||
|
Reference in New Issue
Block a user