Home | History | Annotate | Download | only in include
      1 /*---------------------------------------------------------------------------*
      2  *  ESR_Locale.h  *
      3  *                                                                           *
      4  *  Copyright 2007, 2008 Nuance Communciations, Inc.                               *
      5  *                                                                           *
      6  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
      7  *  you may not use this file except in compliance with the License.         *
      8  *                                                                           *
      9  *  You may obtain a copy of the License at                                  *
     10  *      http://www.apache.org/licenses/LICENSE-2.0                           *
     11  *                                                                           *
     12  *  Unless required by applicable law or agreed to in writing, software      *
     13  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
     14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
     15  *  See the License for the specific language governing permissions and      *
     16  *  limitations under the License.                                           *
     17  *                                                                           *
     18  *---------------------------------------------------------------------------*/
     19 
     20 #ifndef __ESR_LOCALE_H
     21 #define __ESR_LOCALE_H
     22 
     23 
     24 
     25 #include "ESR_SharedPrefix.h"
     26 #include "ptypes.h"
     27 
     28 /**
     29  * @addtogroup ESR_LocaleModule ESR_Locale API functions
     30  * Locale support functions.
     31  *
     32  * @{
     33  */
     34 
     35 /**
     36  * List of locales.
     37  */
     38 typedef enum
     39 {
     40   /**
     41    * US English
     42    */
     43   ESR_LOCALE_EN_US,
     44 
     45   /**
     46    * France French
     47    */
     48   ESR_LOCALE_FR_FR,
     49 
     50   /**
     51    * Germany German
     52    */
     53   ESR_LOCALE_DE_DE,
     54 
     55   /**
     56    * UK English
     57    */
     58   ESR_LOCALE_EN_GB,
     59 
     60   /* others */
     61   ESR_LOCALE_IT_IT,
     62   ESR_LOCALE_NL_NL,
     63   ESR_LOCALE_PT_PT,
     64   ESR_LOCALE_ES_ES,
     65   ESR_LOCALE_JA_JP
     66 
     67 } ESR_Locale;
     68 
     69 /**
     70  * Given a locale, returns its string representation.
     71  *
     72  * @param locale The locale to translate
     73  * @return Locale string
     74  */
     75 ESR_SHARED_API LCHAR* ESR_locale2str(const ESR_Locale locale);
     76 
     77 /**
     78  * Given a locale's string representation, returns the associated ESR_Locale handle.
     79  *
     80  * @param str String representation of locale
     81  * @param locale [out] Resulting locale
     82  * @return ESR_INVALID_ARGUMENT if specified local was not recognized
     83  */
     84 ESR_SHARED_API ESR_ReturnCode ESR_str2locale(const LCHAR* str, ESR_Locale* locale);
     85 
     86 /**
     87  * @}
     88  */
     89 
     90 #endif /* __ESR_LOCALE_H */
     91