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

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

int main(void) {

UniChar       *locale_string = L"de_DE";  /*German in Germany locale string */
LocaleToken   locale_token;
int           rc = ULS_SUCCESS;

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

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

         return ULS_SUCCESS;


}



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