Foundation > Internationalization > Locale Requirements > X Library Support (UNIX only)
 
X Library Support (UNIX only)
Your X Window system needs to support the desired language. You can run the following program to find out if the appropriate X libraries are available on your system:
#include <X11/Xlib.h>
#include <X11/Xlocale.h>
#include <stdlib.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 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.