Documentation
¶
Overview ¶
Package Translation provides methods for working with Translation object instances.
Index ¶
- type Advanced
- type Any
- type Implementation
- type Instance
- func (self Instance) AddMessage(src_message string, xlated_message string)
- func (self Instance) AddPluralMessage(src_message string, xlated_messages []string)
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsTranslation() Instance
- func (self Instance) EraseMessage(src_message string)
- func (self Instance) GetMessage(src_message string) string
- func (self Instance) GetMessageCount() int
- func (self Instance) GetMessageList() []string
- func (self Instance) GetPluralMessage(src_message string, src_plural_message string, n int) string
- func (self Instance) GetTranslatedMessageList() []string
- func (self Instance) Locale() string
- func (self Instance) SetLocale(value string)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.Translation
[Translation]s are resources that can be loaded and unloaded on demand. They map a collection of strings to their individual translations, and they also provide convenience methods for pluralization.
See [Interface] for methods that can be overridden by a [Class] that extends it.
%!(EXTRA string=Translation)
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddMessage ¶
Adds a message if nonexistent, followed by its translation. An additional context could be used to specify the translation context or differentiate polysemic words.
func (Instance) AddPluralMessage ¶
Adds a message involving plural translation if nonexistent, followed by its translation. An additional context could be used to specify the translation context or differentiate polysemic words.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsTranslation ¶
func (Instance) EraseMessage ¶
Erases a message.
func (Instance) GetMessage ¶
Returns a message's translation.
func (Instance) GetMessageCount ¶
Returns the number of existing messages.
func (Instance) GetMessageList ¶
Returns all the messages (keys).
func (Instance) GetPluralMessage ¶
Returns a message's translation involving plurals. The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
func (Instance) GetTranslatedMessageList ¶
Returns all the messages (translated text).