DirectuX
26-08-2019, 22:14
Hi,
here : help/html/ci18n.htm (https://www.thinbasic.com/public/products/thinBasic/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
here : help/html/ci18n.htm (https://www.thinbasic.com/public/products/thinBasic/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