The multilingual¶
You can have the string resources as an asset data .
This system can change string resources depending on your application locale.
However , it is not essential on the window system .
When creating an asset data of the character data , using the MS-Excel.
We have prepared the tool for outputting binary data for the resource data from the Excel data.
C# Object for using the output data is are prepared as follows.
CMessageDataSheetMgr
CMessageDataSheet
The excel format of string resources¶
The excel file format is shown in the following figure .
[ORIGIN]¶
It parses the data on the basis of the column named [ORIGIN].
It is necessary to place it on the location where the data begins.
The same line as the [ORIGIN] will be commented. It does not affect the data output .
[D],[R]¶
[D] [R] of the B4 columns and C4 column select to whether or not to output data for what the version. When individual column is blank , that line will suppress the data output.
[D] is the debug version
[R] is the release version
Character of D and R can be set freely. Whether or not to output any data by the argument can be selected. If you want to add new version, add the line.
How to convert from Excel data to string resource data¶
You can use messagedata.exe or messagedata.py.
Installation please refer to here .
This converter is written in python (2.6 or later) .
It has imported the openpyxl to read Excel data .
If you want to convert to the exe file from this python script , You are possible to use the pyinstaller.
[ How to Use ] messagedata.exe or messagedata.py¶
messagedata [-v version] Excel file name [output file name]
-v version
It outputs the data of the string set in version. By default, it has become D.
Excel file name
Specify the Excel file .
output file name
When it is omitted , it generates from the Excel file name .
messagedata -v R messagedata.xlsx caption
output file names:
messagedata.JP.bin
messagedata.EN.bin
etc
Asset bundling¶
This is the procedure of asset bundling that is provided as standard .
There is also a method which load a data as binary.
Select the [Tools]->[KsSoft]->[Export Binary Data] from the menu.
If you want to add the locale data, add in the KsSoftConfig .