-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhowto.txt
More file actions
16 lines (10 loc) · 770 Bytes
/
howto.txt
File metadata and controls
16 lines (10 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1. Create XML-file with structure like:
<LocalisationFile>
<Record id = 'id_1'>first record</Record>
<Record id = 'id_2'>second record</Record>
</LocalisationFile>
2. Mark all text elements which need to localise as $<id>, where <id> is string (with no spaces).
3. Link Localisation.dll to app and use these functions:
int __stdcall LoadLocaleFile(const wchar_t *xml_file) - to load localisation xml-file.
wchar_t* __stdcall Localise(const wchar_t *mark) - to get localised text.
Localise() geting mark (like $1) and searching for it in record list. If it found, function returns record that assigned to mark. If an error occurs, the function will return NULL. The detailed error text can be obtained by calling the function const wchar_t* __stdcall GetError().