Appendices > Internationalization in Rogue Wave Server > X Library Support (UNIX Systems Only)
 
X Library Support (UNIX Systems Only)
Your X Window system needs to support the desired language. The appropriate X libraries must be available on your system.
You can run the following program to find out if the appropriate X libraries are available:
#include <X11/Xlib.h>
#include <stdlib.h>
#include <X11/Xlocale.h>
#include <stdio.h>
 
int
main(int argc, char* argv[])
{
char* loc = setlocale(LC_CTYPE, "");
if (loc == NULL) {
fprintf(stderr, "System does not support this locale.\n");
exit(1);
}
if (!XSupportsLocale()) {
fprintf(stderr, "X does not support locale %s.\n", loc);
exit(1);
}
if (XSetLocaleModifiers("") == NULL) {
fprintf(stderr, "Warning: cannot set locale modifiers for %s.\n", loc);
} else
fprintf(stderr, "Locale %s is supported by Xlib.\n", loc);
exit(0);
}
For example, on an HP system where Arabic is not supported, setting LANG to ar_DZ.arabic8, gives the following output:
X does not support locale ar_DZ.arabic8.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.