Drag[en]gine Script Module DragonScript
1.23
|
LanguagePack builder. More...
Public Member Functions | |
Constructors | |
LanguagePackBuilder | new () |
Create language pack builder. More... | |
Management | |
LanguagePack | build (String filename) |
Build language pack using filename. More... | |
void | buildLanguagePack () |
Build language pack. More... | |
void | setDescription (UnicodeString description) |
Set description in native language. More... | |
void | setMissingText (UnicodeString missingText) |
Set missing translation text in native language. More... | |
void | setEntryCount (int count) |
Set count of entries. More... | |
void | setEntryAt (int index, String name, UnicodeString text) |
Set entry. More... | |
LanguagePack builder.
Builds language pack resource without requiring a language pack resource file. The created language pack can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named language packs can not clash with filenames present in the virtual file system. For this reason use unnamed language packs if possible. Using named language packs though can be useful if you want to provide language pack resources to scripts not needing to know if the path they try to load is a build language pack instead of a resource one.
To use the language pack builder create a subclass and implement LanguagePackBuilder.buildLanguagePack() . You are only allowed to call methods from LanguagePackBuilder from inside this function call. To create the language pack call LanguagePackBuilder.build() . This will call LanguagePackBuilder.buildLanguagePack() to fill a new language pack resource with content. Once finished the build method returns the ready to use language pack resource. Otherwise an exception is thrown.
This is a native class.
LanguagePack Dragengine.Scenery.LanguagePackBuilder.build | ( | String | filename | ) |
Build language pack using filename.
The created language pack can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named language packs can not clash with filenames present in the virtual file system. For this reason use unnamed language packs if possible. Using named language packs though can be useful if you want to provide language pack resources to scripts not needing to know if the path they try to load is a build language pack instead of a resource one.
To create the language pack call build() . This will call buildLanguagePack() to fill a new language pack resource with content. Once finished the build method returns the ready to use language pack resource. Otherwise an exception is thrown.
|
protected |
Build language pack.
Called by build(String) to fill a new language pack resource with content. You are only allowed to call methods from LanguagePackBuilder from inside this function call.
LanguagePackBuilder Dragengine.Scenery.LanguagePackBuilder.new | ( | ) |
Create language pack builder.
|
protected |
Set description in native language.
|
protected |
Set entry.
|
protected |
Set count of entries.
|
protected |
Set missing translation text in native language.