Using GeLoadString to load description string
-
On 18/02/2014 at 02:50, xxxxxxxx wrote:
The whole purpose (at least some of it) if using IDs, is that the IDs remain, you just use different language (strings) files.
-
On 18/02/2014 at 03:37, xxxxxxxx wrote:
IMO that is correct for .str as part of the resource files.
I am now using c4d_symbols.h and c4d_symbols.str, not part of the resource files.
I guess that is the only way to use GeLoadString(id)?I also wonder about c4d_symbols.h and c4d_symbols.str. What is the use of them when you have resource files?
-
On 18/02/2014 at 03:59, xxxxxxxx wrote:
Hi, others here are certainly better to answer this, but I know this much:
Look at the folder yourplugin/res/strings_us
In this folder you put US English strings.
You will have other folders for other languages, of course.
The c4d_symbols.str is for strings independent of your classes, "global strings" if you like.
The other, class specific strings, have their own *.h, *.cpp, *.res, *.str files. -
On 18/02/2014 at 04:35, xxxxxxxx wrote:
Ok, but I thought based on the replies in this post, that GeLoadString(id) only works with c4d_symbols.h and c4d_symbols.str?
-
On 18/02/2014 at 04:43, xxxxxxxx wrote:
Class-specific strings are automatically loaded with Register...() for your plugin and are associated with its descriptions directly. Global strings need to use GeLoadString() wherever needed because there is no direct association (in a dialog or the console or statusbar etc.).
-
On 18/02/2014 at 04:47, xxxxxxxx wrote:
Ok, thanks.
Conclusion: Global strings need to use GeLoadString() and are defined in c4d_symbols.h and c4d_symbols.str and are in only one language (not langugae dependent).
-
On 18/02/2014 at 06:10, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Conclusion: Global strings need to use GeLoadString() and are defined in c4d_symbols.h
Yes
Originally posted by xxxxxxxx
and c4d_symbols.str and are in only one language (not langugae dependent).
No
-
On 18/02/2014 at 08:56, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Ok, thanks. Conclusion: Global strings need to use GeLoadString() and are defined in c4d_symbols.h and c4d_symbols.str and are in only one language (not langugae dependent).
Incorrect, c4d_strings.str is _inside_ the folder strings_us so all you do is create another c4d_strings.str in a different language and make sure it is in the correct folder for that language. AIUI Cinema will use the correct one when you call GeLoadString().
-
On 18/02/2014 at 09:24, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Originally posted by xxxxxxxx
Ok, thanks. Conclusion: Global strings need to use GeLoadString() and are defined in c4d_symbols.h and c4d_symbols.str and are in only one language (not langugae dependent).
Incorrect, c4d_strings.str is _inside_ the folder strings_us so all you do is create another c4d_strings.str in a different language and make sure it is in the correct folder for that language. AIUI Cinema will use the correct one when you call GeLoadString().
As noted, you can support any of the languages which Cinema 4D supports by creating the proper folder for the c4d_symbols.str files (strings_us for English, strings_de for German, strings_fr for French, strings_es for Spanish, etc.). You use the same IDs but the strings are in another language.
You need to use four-character escape UNICODE to add foreign characters - for instance, \u00a9 is the Copyright symbol. You can find UNICODE PDFs online.
Finally, to support other languages for direct-string plugins, you use the same folder but put the .str file in a 'description' subfolder, i.e.:
strings_us
--- c4d_symbols.str
--- description
------ OmyObjPlugin.str -
On 18/02/2014 at 11:57, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Incorrect, c4d_strings.str is _inside_ the folder strings_us so all you do is create another c4d_strings.str in a different language and make sure it is in the correct folder for that language. AIUI Cinema will use the correct one when you call GeLoadString().
Thanks, that makes sense.
-
On 18/02/2014 at 12:05, xxxxxxxx wrote:
Originally posted by xxxxxxxx
You need to use four-character escape UNICODE to add foreign characters - for instance, \u00a9 is the Copyright symbol. You can find UNICODE PDFs online.
Thanks, valuable information.