Howto access .RC/.RES Ressource files with portable C++ code ( BCC,MSVC,GNU-C++,OpenWatcom)?

R

Rolf Hemmerling

Hello !

Beginner's question:

Howto access .RC/.RES Ressource files with portable C++ code (
BCC,MSVC,GNU-C++, OpenWatcom) ?

I just wanna access "local language strings", so that I may replace the
..RC file to compile a version of my software for a different language.

Of course it is o.k. to use preprocessor commands !
Any free demo script available ?

I am using

free Borland C++ 5.5 - no ressource editor
MS Visual Studio .NET 2003 - built-in ressource editor
free OpenWatcom 11.c ( shipped with a ressource editior )
free Dev-C++ & MingW = GNU-C for Windows - no ressource editor

WeditRes
http://www.objectcentral.com/vide.htm
http://www.cs.virginia.edu/~lcc-win32/

Gnu-C++ with Linux

Do you know any other FREE ressource editors for Windows ?

Is it possible to write a common ressource file for Borland / Microsoft
/ OpenWatcom, and if so with which (free) ressource editor ? If so if I
just wanna access text strings ?

And how to get compatibility between the Windows compilers (
BCC/MSVC/Watcom/GNU C++) and Linux ( just GNU C++), with ressources ?

As I am a beginner, how and with what should I start ?

As Linux support ist just "second choice" a solution "portable for any
Windows compiler" is acceptable ( but a drawback, of course).

Sincerely
Rolf
 
R

Rolf Hemmerling

I just learned that there is
gettext
http://www.gnu.org/software/gettext/gettext.html
, which is supported natively by

wxWindows
http://www.wxwindows.org/manuals/2.4.2/wx460.htm
,

if I just wanna have local strings.

Do you like it, is it usual to use it ?

But of course, as I wanna support MFC / .NET frameworks, its o.k. to
look for a common way for accessing ressources with C++ on Windows platform.

As the mandatory GUI platform ist "QT"
http://www.trolltech.com/
, any suggestions ?

So internationalisation with gettext, but another .RC/.RES file for
MFC/.NET GUI, but no .RC/.RES file for all other GUI framworks ?

Sincerely
Rolf
 
R

Rolf Magnus

Rolf said:
I just learned that there is
gettext
http://www.gnu.org/software/gettext/gettext.html
, which is supported natively by

wxWindows
http://www.wxwindows.org/manuals/2.4.2/wx460.htm
,

if I just wanna have local strings.

Do you like it, is it usual to use it ?

But of course, as I wanna support MFC / .NET frameworks, its o.k. to
look for a common way for accessing ressources with C++ on Windows
platform.

As the mandatory GUI platform ist "QT"
http://www.trolltech.com/
, any suggestions ?

Qt has its own support for i18n. I suggest you use this.
See http://doc.trolltech.com/3.2/i18n.html
 
R

Roger Leigh

Rolf Hemmerling said:
I just learned that there is
gettext [...]
if I just wanna have local strings.

Do you like it, is it usual to use it ?

Yes. gettext (libintl) is the de-facto i18n/l10n framework in the
free software world. It's very good, and it's easy to maintain
translatable strings and translations. There are several tools
available for translation work, and end-users can create/edit
translations without any messing with resource files.

One of the best features of gettext is the merging of new and changed
strings with existing translations. Tools such as Emacs po-mode allow
very easy updating of translations.
But of course, as I wanna support MFC / .NET frameworks, its o.k. to
look for a common way for accessing ressources with C++ on Windows
platform.

I don't know how resource files work, so I can't help here. It might
be possible to construct the resource file from the strings extracted
with xgettext. That's a question for a MS group.
As the mandatory GUI platform ist "QT"
http://www.trolltech.com/
, any suggestions ?

There's also Gtkmm, which is well worth investigating. It uses
gettext for i18n. It integrates well with the Standard Library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top