Multi-language plugin
-
I was wondering if there is a built-in possibility so a plugin can be installed in different languages?
Probably somewhere with the resources? I assume the .strings files are translation files? -
Check out the example scripts that comes with SketchUp, they demonstrates some methods for localizing strings.
Not sure how many script authors use them. Me and some few others use our own wrappers. I use this custom class from my TT_Lib2 library: http://www.thomthom.net/software/sketchup/tt_lib2/doc/TT/Babelfish.html
That's because I wanted more features than what SU provided. And a less verbose way to add the strings. -
Thx for th information thomthom, i'll have a look
-
ThomThom
I have had a look at the way SU works (with LanguageHandler.new)
I'm still a bit puzzled though on what the best way to do this isDefault LanguageHandler seems to look into Resources/en-US directory for the strings file
So i suppose when a french SU version is installed it will look into Resources/FR (or something simular)This, in short would mean that the user (or the installation procedure) would need to put the correct language file in the correct directory (english language file in en-US, french language file in FR)
Is there an easier way to do this?
Maybe write all the plugin specific language files in a directory and access those? -
Wouldn't it be a good idea to create a global system for all plugins?
-
Sketchup tried it... BUT many of us prefer our own methods...
Advertisement