Re: Language Support



Sonu wrote:
Hi All,
Windows Support IsValidLocale.
it determines whether a specified locale identifier is valid.
Currently, the function tests whether a locale identifier is installed
or supported on the calling system, based on the specified validity
test.

but i need to implement in Linux Mechine . is there any Function
available? if not available then can any body help how to solve this
function which will do the same as IsValidateLocale..

Regards
Sonu

A tiny idea:

#include <locale.h>

int main()
{
char *locale;

// Setlocale(...) returns initial (previous) locale or NULL if error.
locale = setlocale(LC_TIME, "UK_xy");

/ It was OK?
if (locale == NULL)
printf("Cannot set locale. It's BAD\n");
else
setlocale(LC_TIME, locale); // Reset back.

}

// #include <langinfo.h>
// char *nl_langinfo(nl_item item);

.



Relevant Pages

  • Language Support
    ... Windows Support IsValidLocale. ... it determines whether a specified locale identifier is valid. ... the function tests whether a locale identifier is installed ...
    (comp.os.linux.development.apps)
  • Similar to IsValidLocale Function
    ... Windows Support IsValidLocale. ... it determines whether a specified locale identifier is valid. ... the function tests whether a locale identifier is installed ...
    (microsoft.public.vc.mfc)