可选lock可选name静态DEBUG静态provider静态cpu静态gpu增加一个依赖内容
依赖内容
增加多个依赖内容
依赖内容
The type of event.
可选data: any(Optional) Data to pass to the callback. If multiple parameters p1, p2, p3, ... need to be passed, use an array structure such as [p1, p2, p3, ...]. If a single parameter p needs to be passed and p is an array, use a structure such as [p]. For other single parameters p, you can directly pass parameter p. If data is Event.EMPTY, it means passing an Event object to the callback function. Note that it is not passing Event.TEMP, but an independent Event object.
True if there are listeners for this event type, false otherwise.
The type of event.
The listener function.
This EventDispatcher object.
The type of event.
The execution scope of the event listener function.
可选listener: FunctionThe listener function.
可选args: any[]This EventDispatcher object.
可选type: string(Optional) The type of event. If the value is null, all types of listeners on this object are removed.
This EventDispatcher object.
The target caller object.
This EventDispatcher object.
The type of event.
The listener function.
This EventDispatcher object.
The type of event.
The execution scope of the event listener function.
The listener function.
可选args: any[](Optional) The callback parameters of the event listener function.
This EventDispatcher object.
The type of event.
The listener function.
This EventDispatcher object.
The type of event.
The execution scope of the event listener function.
The listener function.
可选args: any[](Optional) The callback parameters of the event listener function.
This EventDispatcher object.
The language code for which the content is being set. If not provided, the current language of the i18n provider will be used.
The content to set for the specified language, which should be an object containing key-value pairs for translations.
The Translations instance itself for method chaining.
The name of the translation key to look up. It can be a simple key or a namespaced key in the format "namespace:key".
可选defaultValue: stringOptional default value to return if the translation key is not found. If provided, it will be returned as a fallback.
The translated string. If the translation key is not found, the default value will be returned if provided, otherwise the key itself will be returned.
The name of the translation key to look up. It can be a simple key or a namespaced key in the format "namespace:key".
Optional parameters for translation, such as variables to replace in the text.
The translated string. If the translation key is not found, the default value will be returned if provided, otherwise the key itself will be returned.
The name of the translation key to look up. It can be a simple key or a namespaced key in the format "namespace:key".
Optional default value to return if the translation key is not found. If provided, it will be returned as a fallback.
Optional parameters for translation, such as variables to replace in the text.
The translated string. If the translation key is not found, the default value will be returned if provided, otherwise the key itself will be returned.
静态createThe ID for the new Translations instance.
可选fallbackLng: stringThe fallback language to use if the specified language is not available.
A new Translations instance.
静态decodeThe i18n text string to decode, which should be in the format "i18n:sid:key|text" or "i18n:key|text".
可选out: I18nTextInfoOptional output object to store the decoded information. If not provided, a new object will be created.
An object containing the decoded information, with properties sid, key, and text.
静态destroy静态encodeThe i18n text information object containing sid, key, and text properties.
可选newText: stringOptional new text to replace the existing text in the i18n text object. If not provided, the existing text will be used.
A string in the format "i18n:sid:key|text" or "i18n:key|text", depending on whether sid is present.
静态getThe ID of the Translations instance.
The Translations instance associated with the given ID, or null if not found.
静态translate
En
Translations is a class that provides internationalization (i18n) support for applications.
Zh
Translations 是一个为应用程序提供国际化 (i18n) 支持的类。