Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

kertam

Uploaded by

kertam

Virus scan

Safe to use

Tags for this mod

About this mod

1. Translation tool
2. Add a method to directly obtain the translated string from the code,
3. In addition, a method of formatting strings is added.

Requirements
Permissions and credits
Before that, I directly changed the SKSE code. Later, vs2022 refused to compile the SKSE I changed. I had to think of new ways to add translation tools to help non English users use word order that conforms to their language habits.

usage method:

e.g. one:


String str1 = StringUtil.Translate("$SomeKey");// Hello {0},{1} and {2}!
String[] strArg = new String[3];
strArg[0] = "Lili";
strArg[1] = "Apple";
strArg[2] = "Kittle";
String str2 = StringUtil.Format(str1,strArg);
;If you use the above method, you must add the following code to the StringUtil.psc file and recompile the file.
;Get transslation
String Function Translate(String key) global native
;Format string
String Function Format(String str, String[] arguments) global native




e.g. two:
Change StringUtil in method 1 to KertamDeTranslateHelper.
e.g. three:
Create a new psc file, extend KertamDeTranslateHelper, compile it, and use your own object name.

Only files of the second method are provided here. If you need other methods, you need to change the code yourself. After all, this tool is not provided for ordinary users.