Note: If you do not have a call to IlvSetLocale in your program, the localized messages will not appear on the screen and multibyte support will not be enabled. Your program will behave as if you are running in the C locale, thus displaying only English messages. |
// -------------------------------------------------------------- -*- C++ -*- // File: doc/fondation/userman/src/internationalization/setLocale.cpp // -------------------------------------------------------------------------- // Copyright (C) 1990-2008 by ILOG. // All Rights Reserved. // -------------------------------------------------------------------------- #include <ilviews/gadgets/gadcont.h> #include <ilviews/gadgets/textfd.h> #include <stdio.h> static void Quit(IlvView*, IlvAny) { IlvExit(0); } int main (int argc, char* argv[]) { if (!IlvSetLocale()) { printf("Falling back to the C locale.\n"); } IlvDisplay* display = new IlvDisplay("Test", 0, argc, argv); IlvRect rect(20,20,250,80); IlvGadgetContainer* cont = new IlvGadgetContainer(display, "Container", "Container", rect); cont->setDestroyCallback(Quit, 0); IlvRect rect1(10,10,220,50); IlvTextField* tf = new IlvTextField(display, "This is a text field.", rect1); cont->addObject(tf); IlvMainLoop(); return 0; } |