Stefan
Stefan

Reputation: 776

C++ l10n, i18n solution with GNU gettext, libunistring

I'm writing a C++ application which shall be locale independent, so I decided to use UTF-16 as my in-memory representation for strings/texts (the application should be as platform independent as possible). For localize the application's messages i want to use GNU's gettext library. Since this library seems to use GNU's libunistring library internally, i want to use this one too.

Is this a good solution for i18n, l10n? I mean it will be a lot of C code in my C++ classes (I don't found a C++ Wrapper for the libunistring library).

Stefan

PS: It's my first big C++ application.

Upvotes: 2

Views: 1305

Answers (2)

Roman A. Taycher
Roman A. Taycher

Reputation: 19505

If it is a gui application written in c++, qt might be a good toolkit to do it in. It includes its own string class and its own internationalization support:

http://doc.trolltech.com/4.7/internationalization.html.

Also you can use the core non gui classes by themselves(they are in their own QtCore namespace separate form the QtGui namespace, and there are compiled to separate dynamically linked libraries).

Upvotes: 1

Klaim
Klaim

Reputation: 69772

Use UTF8 instead. see :

Upvotes: 3

Related Questions