Back to index

php5  5.3.10
Classes | Typedefs | Enumerations | Functions
mbfl_language.h File Reference
#include "mbfl_defs.h"
#include "mbfl_encoding.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _mbfl_language

Typedefs

typedef typedef enum
mbfl_no_language struct
_mbfl_language 
mbfl_language

Enumerations

enum  mbfl_no_language {
  mbfl_no_language_invalid = -1, mbfl_no_language_neutral, mbfl_no_language_uni, mbfl_no_language_min,
  mbfl_no_language_catalan, mbfl_no_language_danish, mbfl_no_language_german, mbfl_no_language_english,
  mbfl_no_language_estonian, mbfl_no_language_greek, mbfl_no_language_spanish, mbfl_no_language_french,
  mbfl_no_language_italian, mbfl_no_language_japanese, mbfl_no_language_korean, mbfl_no_language_dutch,
  mbfl_no_language_polish, mbfl_no_language_portuguese, mbfl_no_language_swedish, mbfl_no_language_simplified_chinese,
  mbfl_no_language_traditional_chinese, mbfl_no_language_russian, mbfl_no_language_ukrainian, mbfl_no_language_armenian,
  mbfl_no_language_turkish, mbfl_no_language_max
}

Functions

MBFLAPI const mbfl_languagembfl_name2language (const char *name)
MBFLAPI const mbfl_languagembfl_no2language (enum mbfl_no_language no_language)
MBFLAPI enum mbfl_no_language mbfl_name2no_language (const char *name)
MBFLAPI const char * mbfl_no_language2name (enum mbfl_no_language no_language)

Class Documentation

struct _mbfl_language

Definition at line 71 of file mbfl_language.h.


Typedef Documentation

typedef typedef enum mbfl_no_language struct _mbfl_language mbfl_language

Enumeration Type Documentation

Enumerator:
mbfl_no_language_invalid 
mbfl_no_language_neutral 
mbfl_no_language_uni 
mbfl_no_language_min 
mbfl_no_language_catalan 
mbfl_no_language_danish 
mbfl_no_language_german 
mbfl_no_language_english 
mbfl_no_language_estonian 
mbfl_no_language_greek 
mbfl_no_language_spanish 
mbfl_no_language_french 
mbfl_no_language_italian 
mbfl_no_language_japanese 
mbfl_no_language_korean 
mbfl_no_language_dutch 
mbfl_no_language_polish 
mbfl_no_language_portuguese 
mbfl_no_language_swedish 
mbfl_no_language_simplified_chinese 
mbfl_no_language_traditional_chinese 
mbfl_no_language_russian 
mbfl_no_language_ukrainian 
mbfl_no_language_armenian 
mbfl_no_language_turkish 
mbfl_no_language_max 

Definition at line 37 of file mbfl_language.h.


Function Documentation

MBFLAPI const mbfl_language* mbfl_name2language ( const char *  name)

Definition at line 90 of file mbfl_language.c.

{
       const mbfl_language *language;
       int i, j;

       if (name == NULL) {
              return NULL;
       }

       i = 0;
       while ((language = mbfl_language_ptr_table[i++]) != NULL){
              if (strcasecmp(language->name, name) == 0) {
                     return language;
              }
       }

       i = 0;
       while ((language = mbfl_language_ptr_table[i++]) != NULL){
              if (strcasecmp(language->short_name, name) == 0) {
                     return language;
              }
       }

       /* serch aliases */
       i = 0;
       while ((language = mbfl_language_ptr_table[i++]) != NULL) {
              if (language->aliases != NULL) {
                     j = 0;
                     while ((*language->aliases)[j] != NULL) {
                            if (strcasecmp((*language->aliases)[j], name) == 0) {
                                   return language;
                            }
                            j++;
                     }
              }
       }

       return NULL;
}

Here is the caller graph for this function:

MBFLAPI enum mbfl_no_language mbfl_name2no_language ( const char *  name)

Definition at line 147 of file mbfl_language.c.

{
       const mbfl_language *language;

       language = mbfl_name2language(name);
       if (language == NULL) {
              return mbfl_no_language_invalid;
       } else {
              return language->no_language;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 131 of file mbfl_language.c.

{
       const mbfl_language *language;
       int i;

       i = 0;
       while ((language = mbfl_language_ptr_table[i++]) != NULL){
              if (language->no_language == no_language) {
                     return language;
              }
       }

       return NULL;
}

Here is the caller graph for this function:

MBFLAPI const char* mbfl_no_language2name ( enum mbfl_no_language  no_language)

Definition at line 160 of file mbfl_language.c.

{
       const mbfl_language *language;

       language = mbfl_no2language(no_language);
       if (language == NULL) {
              return "";
       } else {
              return language->name;
       }
}

Here is the call graph for this function: