oiking
06-08-2008 15:50:02
I know some other GUI systems where you can let replace strings in the GUI definitions with other strings on load-time.
It's realized by giving the GUI system a callback with a "translate" method that takes a string and returns another. This makes Localization of projects really easy as you can just write placeholders like [START] or [MAKE_MY_DAY] or [DESCRIPTION_GAMEPLAY] into your GUI files and let the callback check for [xxx] and replace the string accordingly with the correct language string.
I had a quick look into the mygui source to find the best place to implement such a system, but I couldn't find a good interface where I can intercept assignments from the GUI files easily. Can you give me a hint where I could start? When it's done, I'll provide you with the actualized files or patches.
If I am totally wrong and mygui already has this feature, please forgive me and point me the right way
It's realized by giving the GUI system a callback with a "translate" method that takes a string and returns another. This makes Localization of projects really easy as you can just write placeholders like [START] or [MAKE_MY_DAY] or [DESCRIPTION_GAMEPLAY] into your GUI files and let the callback check for [xxx] and replace the string accordingly with the correct language string.
I had a quick look into the mygui source to find the best place to implement such a system, but I couldn't find a good interface where I can intercept assignments from the GUI files easily. Can you give me a hint where I could start? When it's done, I'll provide you with the actualized files or patches.
If I am totally wrong and mygui already has this feature, please forgive me and point me the right way
