This example shows how to convert a locale token to a locale specification string.

#include <stdio.h>
#include <unidef.h>

int main(void) {

UniChar       *locale_string;
LocaleToken   locale_token;
int           rc = ULS_SUCCESS;

         /* Spanish in Spain locale token */

         locale_token = 0x100210E0;

         /* Convert the token to a locale string */

         rc = UniLocaleTokenToStr(locale_token,
                                 UNI_UCS_STRING_POINTER,
                                 (void **)&locale_string);

         if (rc != ULS_SUCCESS) {
           printf("UniLocaleTokenToStr error: return code = %u\n", rc);
           return 1;
         }

         return ULS_SUCCESS;


}


[Back: UniLocaleTokenToStr - Related Functions]
[Next: UniLocaleTokenToStr - Topics]