Thanks, will be present in next release
Hi,
here : help/html/ci18n.htm , this example might be more coherent with the upper xml example :
How to get values from parsed XML file
Once file is loaded and parsed, all data inside XML file is stored into an hash table with key/data pairs.
The key under which data is stored is composed by a concatenation of nodes and sibling nodes separated by \
if MyI18N.ErrorPresent Then '---Some error occurred printl "Error code", MyI18N.ErrorCode printl "Error description", MyI18N.ErrorDescription Else '---No errors, we can go on printl MyI18N.GetKey("thinAir") printl MyI18N.GetKey("en-GB\HiThere") printl MyI18N.GetKey("it-IT\Good_Morning") printl MyI18N.GetKey("fr-FR\What_Is_Your_Name") printl StrFormat$(MyI18N.GetKey("en-GB\My_Name_Is"),"thinBasic") printl MyI18N.GetKey("thinBasic\en-GB") end if
ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64
Thanks, will be present in next release
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Here : https://www.thinbasic.com/public/pro.../html/i18n.htm
I18N module will automatically create a I18N variable of cI18N classHow to use this module
Inside your script, before calling any module specific keyword, add the following:
USES "I18N"
This directive will load the module and add new keywords and classes described in this section.
IMPORTANT
When loaded, I18N module will automatically create a I18N variable of cI18N class allowing programmer to load XML files.
So to use this module, just use the automatic variable I18N.
This seems not true: if you remove the Dim instruction in the I18N sample, you'll get an Unknown Keyword error.
ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64
https://www.thinbasic.com/public/pro..._getlocale.htm
https://www.thinbasic.com/public/pro..._setlocale.htm
on these help pages,
the syntax line and page title are not the good ones. (Sort of Copy/Paste oversight)
ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64
Thanks for reporting these issues, Sebastian!
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Bookmarks