xsltlocale: Locale handling

## xsltlocale

xsltlocale - Locale handling

Interfaces for locale handling. Needed for language dependent sorting.

Author(s): Nick Wellnhofer

## Synopsis

    typedef void * xsltLocale;
    typedef xmlChar xsltLocaleChar;
    void	xsltFreeLocale			(void * locale);
    void	xsltFreeLocales			(void);
    int	xsltLocaleStrcmp		(void * locale,
    					 const xmlChar * str1,
    					 const xmlChar * str2);
    void *	xsltNewLocale			(const xmlChar * languageTag,
    					 int lowerFirst);
    xmlChar *	xsltStrxfrm		(void * vlocale,
    					 const xmlChar * string);

## Description

## Details

### Typedef xsltLocale

    void * xsltLocale;

### Typedef xsltLocaleChar

    xmlChar xsltLocaleChar;

### xsltFreeLocale ()

    void	xsltFreeLocale			(void * locale)

Frees a locale created with xsltNewLocale

`locale`: | the locale to free

### xsltFreeLocales ()

    void	xsltFreeLocales			(void)

Cleanup function for the locale support on shutdown

### xsltLocaleStrcmp ()

    int	xsltLocaleStrcmp		(void * locale,
    					 const xmlChar * str1,
    					 const xmlChar * str2)

DEPRECATED: Same as xmlStrcmp. Compares two strings transformed with xsltStrxfrm.

`locale`: | unused
`str1`: | a string transformed with xsltStrxfrm
`str2`: | a string transformed with xsltStrxfrm
`Returns`: | a value < 0 if str1 sorts before str2, a value > 0 if str1 sorts after str2, 0 if str1 and str2 are equal wrt sorting

### xsltNewLocale ()

    void *	xsltNewLocale			(const xmlChar * languageTag,
    					 int lowerFirst)

Creates a new locale of an opaque system dependent type based on the language tag.

`languageTag`: | RFC 3066 language tag
`lowerFirst`: |
`Returns`: | the locale or NULL on error or if no matching locale was found

### xsltStrxfrm ()

    xmlChar *	xsltStrxfrm		(void * vlocale,
    					 const xmlChar * string)

Transforms a string according to locale. The transformed string must be freed with xmlFree.

`vlocale`: |
`string`: | UTF-8 string to transform
`Returns`: | the transformed string or NULL on error