CreateLanguage() Example
BlitzMax Forums/MaxGUI Module/CreateLanguage() Example
| ||
I've just finished this basic example to add to the MaxGUI.Localization docs for the next release. Thought I'd post it if anyone is interested in the mean time: |
| ||
Thank you, very clear example! |
| ||
Thanks! Why don't we use "SuperStrict" examples these days!? |
| ||
Nice, Very easy to use! |
| ||
Why don't we use "SuperStrict" examples these days!? Because the world is a cruel, cruel place :( |
| ||
Ok, new help request! This time is about 'Gadget with items' (like ListBox, ComboBox, toolbar...) What I'm doing wrong?! |
| ||
Ok, new help request! This time is about 'Gadget with items' (like ListBox, ComboBox, toolbar...) What I'm doing wrong?! No need to tweak MaxGUI.Drivers - the code is there for a reason. Although admittedly, I should have put some docs in there about it. The question is, where... I'm thinking alongside the docs for LocalizeGadget()? Anyhoo, to specify which of the items within your localized listbox/toolbar gadget should be also be localized, you should specify the GADGETITEM_LOCALIZED flag when creating the item in your AddGadgetItem()/InsertGadgetItem()/ModifyGadgetItem() calls. AddGadgetItem list,"Item 1 {{window_title}}", GADGETITEM_LOCALIZED|GADGETITEM_DEFAULT,,LocalizeString("{{window_title}}") AddGadgetItem list,"Item 2 {{btn_english}}", GADGETITEM_LOCALIZED,,LocalizeString("{{btn_english}}") AddGadgetItem list,"Item 3 {{btn_french}}", GADGETITEM_LOCALIZED,,LocalizeString("{{btn_french}}")This tells the localization engine to localize both the item text and item tooltip strings everytime an update is required. This was coded like this, to provide greater control for the MaxGUI coder. For example, there may be a case where there are a mixture of items (some of which should be localized, some of which shouldn't) or it may be desirable to localize the text/tooltip of, for example, an editable ComboBox gadget, but not the items. |
| ||
you should specify the GADGETITEM_LOCALIZED flag when creating the item in your AddGadgetItem()/InsertGadgetItem()/ModifyGadgetItem() calls. Ah! Ok, this make sense! Thank you! (ps: please put everything you think the user should know in the docs so I dont' disturb you anymore for these questions!!! :) ) |
| ||
please put everything you think the user should know in the docs so I dont' disturb you anymore for these questions!!! That is my aim, although I've obviously missed a few (rather important) things. :P This information has been added to the docs for MaxGUI v1.34c which should now be available for all platforms on the Product Updates page. |
| ||
Thnak you very much! |