ultimatepp/tutorial/Gui24/main.cpp
Gary Wang bbd1c5ffa2
CtrlLib, Doc: Tutorial(Gui24) correct comment and copywriting strings (#243) for zh-cn and zh-tw locale
Correct comment and copywriting strings for zh-cn and zh-tw locale.

As a follow up of #241. The documentation related file is also updated.

Note: I didn't update the attached image resources in the doc (tpp) file, feel free to directly adding or modifying this PR to update these images if preferred.
2025-03-18 19:40:31 +01:00

41 lines
1.2 KiB
C++

#include <CtrlLib/CtrlLib.h>
#define TFILE <Gui24/Gui24.t>
#include <Core/t.h>
using namespace Upp;
struct MyAppWindow : TopWindow {
MyAppWindow() {
Title(t_("My application"));
Zoomable().Sizeable().SetRect(0, 0, 550, 100);
}
void Paint(Draw& w) override {
w.DrawRect(GetSize(), SLtYellow);
w.DrawText(20, 20, t_("Hello translation engine!"), Arial(30), SBlue);
}
};
GUI_APP_MAIN
{
// Set system language for whole application
SetLanguage(GetSystemLNG());
// Uncomment to force specific language...
// SetLanguage("en-us"); // English = default
// SetLanguage("cs-cz"); // Czech
// SetLanguage("de-de"); // German
// SetLanguage("es-es"); // Spanish
// SetLanguage("fr-fr"); // French
// SetLanguage("it-it"); // Italian
// SetLanguage("ja-jp"); // Japanese
// SetLanguage("pl-pl"); // Polish
// SetLanguage("pt-pt"); // Portuguese
// SetLanguage("ru-ru"); // Russian
// SetLanguage("tr-tr"); // Turkish
// SetLanguage("zh-cn"); // Simplified Chinese
// SetLanguage("zh-tw"); // Traditional Chinese
MyAppWindow().Run();
}