You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot's existing system can collect texts that need to be internationalized from code and other places.
However, in game development, more resources that need to be internationalized exist on data model objects. These objects may eventually exist in the form of binary data or json or csv files. The existing system cannot collect resources that need to be internationalized from these places.
RPG Maker Database Editor The name and description properties of the Item object contain international resources that need to be collected.
Assume this is the definition of the item object:
# data model
class_name Item
# other properties
var name: String
var description: String
We can define new i18n_model and i18n_property annotations to mark objects and properties that need to be internationalized.
# update data model
@i18n_model
class_name Item
# other properties
@i18n_property var name: String
@i18n_property var description: String
When the engine generates files such as pot, it will obtain all registered i18n_model types, then load the specific files corresponding to these models through i18n_file_reader, and collect resources that need to be internationalized from them according to the i18n_property information.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Godot's existing system can collect texts that need to be internationalized from code and other places.
However, in game development, more resources that need to be internationalized exist on data model objects. These objects may eventually exist in the form of binary data or json or csv files. The existing system cannot collect resources that need to be internationalized from these places.
RPG Maker Database Editor
The
name
anddescription
properties of theItem
object contain international resources that need to be collected.Assume this is the definition of the item object:
We can define new
i18n_model
andi18n_property
annotations to mark objects and properties that need to be internationalized.When the engine generates files such as pot, it will obtain all registered
i18n_model
types, then load the specific files corresponding to these models throughi18n_file_reader
, and collect resources that need to be internationalized from them according to thei18n_property
information.Reference: This is a unity example
Beta Was this translation helpful? Give feedback.
All reactions