MaxGUI - Localization mod question
BlitzMax Forums/MaxGUI Module/MaxGUI - Localization mod question
| ||
I have some problem with the new Localization functionality In this test I want to change 'on-the-fly' a KEY with another translation. I dont' know how 'force' a change without saving and reloading a language. I think we need a UpdateLanguage() command or something. Second question: RESOLVED - see next post please I've just written this language.ini file to load in my application NOTE: the key 'test' has several splitters (~n end-line) If you notice the Gadget Tool tip is 'truncated' a the first 'split' and it stars with a quotation mark (") Edit: I've re-read the Language.bmx in MaxGUI and I probably found the solution: replace ~n with \n. |
| ||
Just for knowledge the problem #2 in my above post is resolved. In the Langauge.ini file we need to replace 'escape sequence' with these one \\ ~0 \r ~r \n ~n \; ; \# # \: : \t ~t A mention in the local help should be handy. |
| ||
@ Question 1: Have you tried calling SetLocalizationLanguage( LocalizationLanguage() )? I suppose it wouldn't hurt to have a dedicated function - I'll look into it for you. @ Question 2: Nearly... Although the escape sequences are supported, I recommend only to use: \n --> ~n \r --> ~r \t --> ~tIirc, all the other characters don't need to be escaped if you have your entry's value enclosed in quotes. P.S. Also... \\ --> \ (NOT: ~0)Hope this helps! P.P.S. I've just spotted a bug in the handling of "\;" so stear clear of that escape sequence for now - if you need to use semicolon, put the expression in quotes and insert it like you would normally (without the prefix'd backslash). |
| ||
I think I found (my) error. If I use LocalizeGadget(button,"Change language","{{test}}") LocalizeGadget(textfield,"Change language","{{test}}") it seems that the 'tooltip' is correctly managed by the Language-translator. Setting manually via SetGadgetToolTip+LocalizeString has effect only the first time; then the information is 'lost'. |