I have a program that uses reaction objects and help bubbles and want to add to it the ability to display in a different language using new language catalogs.
Is there an example of this somewhere? The Wiki from Hyperion has a reference to it but not a full up example of everything you need to do. What would be great is a simple reaction example - one version without the catalog features and one version of the same program with all the language cataloging added so the user can see the difference.
Thanks!
Basically you need to replace all string constants you want to be translated by the result of a call to GetCatalogStr. Whether you call GetCatalogStr everytime a string is needed or if you translate all strings at once when the program starts and then only work with variables is a matter of taste and the desired performance.
Here is an example how I do it in my programs: http://thomas-rapp.homepage.t-online.de/examples/locale.lha
The CatComp program can produce a piece of code into the catalog.h file, too, but I don't like it.
Thank you for your example.
When I try to make though, I get the following errors:
vc +aos68k main.o locale.o -o example -lamiga -lauto
vc: Unknown command
vc failed returncode 10
make: *** [example] Error 10
What dumb thing am I doing wrong?
Thanks!
You haven't installed VBCC, have you?
Try to change the head of the makefile to
CC=gcc
COPT=-Wall -D__USE_INLINE__
LIBS=-lamiga -lauto
but without guarantee that it compiles without errors.
And do make clean first to delete all the 68k object modules.
Yes, I had installed VBCC in the past. I do not have any assigns to it in my user-startup however. Is there a way to uninstall VBCC?
I made the changes you suggested and get the exact same errors.
More ideas?
Thanks!
You have to remove this
and add this instead:
It is simply not possible to get exactly the same errors after this change. Unless you forgot to save the changes.
Yes, I got it working. I cannot even recall what was wrong, but it now works.
Thank you for the excellent example!
Yes, Thomas' examples are always very helpful! It's great to have him here.
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2