LangFile - DauntlessStudio/Bedrock-Developments GitHub Wiki
Remarks
A class for working with lang files.
• new LangFile(filepattern
): LangFile
Name | Type | Description |
---|---|---|
filepattern |
string |
The glob pattern to find lang files with. If no files match the pattern, a default en_US.lang file will be created automatically. |
Remarks
Gets a list of files from a glob pattern. Note that any valid pattern will work and the file will be treated as a lang file, even without the .lang extension.
• files: File
[]
Remarks
The lang files handled by this class instance, as an array of Files.
▸ addToCategory(categoryName
, ...entries
): void
Name | Type | Description |
---|---|---|
categoryName |
string |
The category to add an entry to, i.e. Item Names . |
...entries |
string [] |
Entries to add to that category, i.e. item.minecraft:test.name=Test . |
void
Remarks
Adds an entry to all the .lang
file in this object's files list.
▸ addToAllLangs(categoryName
, ...entries
): LangFile
Name | Type | Description |
---|---|---|
categoryName |
string |
The category to add an entry to, i.e. Item Names . |
...entries |
string [] |
Entries to add to that category, i.e. item.minecraft:test.name=Test . |
A new LangFile object with every .lang
file in the RP/texts
directory, having added the entries.
Remarks
Adds a lang file entry to every .lang
file in RP/texts
.