|
|
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » CHARSET_UTF8 not working?
|
|
|
|
Re: CHARSET_UTF8 not working? [message #48553 is a reply to message #48551] |
Fri, 21 July 2017 14:44   |
Oblivion
Messages: 1212 Registered: August 2007
|
Senior Contributor |
|
|
Hello rafiwui,
I don't see antyhing wrong with the code or U++.
Quote:]But it only works when I have my language set to czech and that is not what I want to achieve.
As you know, U++ *.t files are meant be used for localization. But you don't really need use the English versions of the strings as default (or at all).
if in the *.cpp file you can simpyl write:
app.Title(t_("přihláška"));
This will make it the default string (the string to be localized, if needed.).
Also you don't need to call:
SetDefaultCharset(CHARSET_UTF8);
UTF8 is/should be enabled by default. This function is to support legacy applications.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Fri, 21 July 2017 14:54] Report message to a moderator
|
|
|
|
Re: CHARSET_UTF8 not working? [message #48556 is a reply to message #48555] |
Fri, 21 July 2017 17:12  |
Oblivion
Messages: 1212 Registered: August 2007
|
Senior Contributor |
|
|
Quote:
1. I learned that it is no good programming style to put non-ASCII letters in pure source code.
Fair point. But not necessarily true. But that's another story... 
Quote:
2. But I want a multinational application, so I need different language support and I don't know how to achieve this in this way.
I've attached a simple example which changes the app title, and static text to English, Czech, and Turkish, using a droplist. Maybe it'll give you an idea.
Quote:But why? Why doesn't it take the string correctly from the .t file but from the source code?
It does. But *.t files are AFAIK component/application-wide, and applied on initialization (not sure about the latter though). It'll pick up the Czech version of the strings only when the language is set to Czech (or the default strings are in Czech).
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Fri, 21 July 2017 17:31] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Jun 21 16:12:20 CEST 2025
Total time taken to generate the page: 0.04189 seconds
|
|
|