
On Tue, Apr 19, 2011 at 9:41 AM, Ryou Ezoe <boostcpp@gmail.com> wrote:
On Tue, Apr 19, 2011 at 4:17 PM, Matus Chochlik <chochlik@gmail.com> wrote:
On Tue, Apr 19, 2011 at 2:10 AM, Edward Diener <eldiener@tropicsoft.com> wrote:
[snip/]
From how I see it there are several ways to handle this:
1) Stick to English phrases (-) Requires good knowledge of the English language (+) Easy to find someone to translate to language Y (+) Portable (+) Lots of mature l10n libraries work this way (+) Works (for English speakers) even if the translation fails
2) Use English identifier strings (as Peter Dimov suggested) (-) Still requires some English (-) Hard to keep unique in large applications (-) Doesn't look good if the translation fails for some reason (+) Requires "less" English
3) Use the u"" U"" literals (-) Current support by the compilers (-) Requires the u/U/... prefix (+) Will be portable in the future (+) Does not require English
4) Use wchar_t and the L"" prefix literals (-) Non-portable and platform dependent (-) Requires the L prefix (+) Works if you are limited to a single platform (+) Does not require English
5) use char with some GUID literals/hashes (-) Completely unusable if the translation fails (-) Takes a lot of using to (easier for GIT users :)) (-) Requires a GUID/hash generator (+) Portable (+) Does not require English
6) keep in original language but transliterate to Latin characters [a-z0-9] (-) Requires picking a good transliteration scheme (-) Hard to read in the code (-) Pretty unusable if the translation fails (+) Does not require the use of English (+) Portable
Take your pick :-)
Matus
char is not portable too. It can be any encodings.
Yes, but the basic character set containing [a-z] and [0-9] (which is all you need for writing the English phrases, GUIDs, ...) is, unless I'm terribly mistaken, in every encoding, otherwise you would not be able to write any C++. Matus