ultimatepp/tutorial/Gui23/main.cpp
klugier 6a19ee30f8 Tutorial: Added Gui23 package related to translation.
git-svn-id: svn://ultimatepp.org/upp/trunk@15368 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-11-08 22:56:24 +00:00

40 lines
1.1 KiB
C++

#include <CtrlLib/CtrlLib.h>
#define TFILE <Gui23/Gui23.t>
#include <Core/t.h>
using namespace Upp;
struct MyAppWindow : TopWindow {
MyAppWindow() {
Title(t_("My application"));
Zoomable().Sizeable().SetRect(0, 0, 400, 100);
}
virtual void Paint(Draw& w) override {
w.DrawRect(GetSize(), SWhite);
w.DrawText(20, 20, t_("Hello translation engine!"), Arial(30), Blue);
}
};
GUI_APP_MAIN
{
// Set system language
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"); // Traditional chinese
MyAppWindow().Run();
}