ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMDLanguageItem Class Reference
+ Collaboration diagram for ilMDLanguageItem:

Public Member Functions

 __construct (string $a_code)
 
 getLanguageCode ()
 

Static Public Member Functions

static _getPossibleLanguageCodes ()
 
static _getLanguages ()
 

Private Attributes

string $language_code
 

Detailed Description

Definition at line 32 of file class.ilMDLanguageItem.php.

Constructor & Destructor Documentation

◆ __construct()

ilMDLanguageItem::__construct ( string  $a_code)

Definition at line 36 of file class.ilMDLanguageItem.php.

37  {
38  $this->language_code = $a_code;
39  }

Member Function Documentation

◆ _getLanguages()

static ilMDLanguageItem::_getLanguages ( )
static
Returns
array<string, string>

Definition at line 201 of file class.ilMDLanguageItem.php.

References $DIC, and $lng.

201  : array
202  {
203  global $DIC;
204 
205  $lng = $DIC->language();
206 
207  $lng->loadLanguageModule("meta");
208 
209  $langs = array();
210  foreach (self::_getPossibleLanguageCodes() as $lngcode) {
211  $langs[$lngcode] = $lng->txt("meta_l_" . $lngcode);
212  }
213  asort($langs);
214  return $langs;
215  }
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31

◆ _getPossibleLanguageCodes()

static ilMDLanguageItem::_getPossibleLanguageCodes ( )
static
Returns
string[]

Definition at line 53 of file class.ilMDLanguageItem.php.

Referenced by ilMDUtilSelect\_getLanguageSelect().

53  : array
54  {
55  return array(
56  "aa",
57  "ab",
58  "af",
59  "am",
60  "ar",
61  "as",
62  "ay",
63  "az",
64  "ba",
65  "be",
66  "bg",
67  "bh",
68  "bi",
69  "bn",
70  "bo",
71  "br",
72  "ca",
73  "co",
74  "cs",
75  "cy",
76  "da",
77  "de",
78  "dz",
79  "el",
80  "en",
81  "eo",
82  "es",
83  "et",
84  "eu",
85  "fa",
86  "fi",
87  "fj",
88  "fo",
89  "fr",
90  "fy",
91  "ga",
92  "gd",
93  "gl",
94  "gn",
95  "gu",
96  "ha",
97  "he",
98  "hi",
99  "hr",
100  "hu",
101  "hy",
102  "ia",
103  "ie",
104  "ik",
105  "id",
106  "is",
107  "it",
108  "iu",
109  "ja",
110  "jv",
111  "ka",
112  "kk",
113  "kl",
114  "km",
115  "kn",
116  "ko",
117  "ks",
118  "ku",
119  "ky",
120  "la",
121  "ln",
122  "lo",
123  "lt",
124  "lv",
125  "mg",
126  "mi",
127  "mk",
128  "ml",
129  "mn",
130  "mo",
131  "mr",
132  "ms",
133  "mt",
134  "my",
135  "na",
136  "ne",
137  "nl",
138  "no",
139  "oc",
140  "om",
141  "or",
142  "pa",
143  "pl",
144  "ps",
145  "pt",
146  "qu",
147  "rm",
148  "rn",
149  "ro",
150  "ru",
151  "rw",
152  "sa",
153  "sd",
154  "sg",
155  "sh",
156  "si",
157  "sk",
158  "sl",
159  "sm",
160  "sn",
161  "so",
162  "sq",
163  "sr",
164  "ss",
165  "st",
166  "su",
167  "sv",
168  "sw",
169  "ta",
170  "te",
171  "tg",
172  "th",
173  "ti",
174  "tk",
175  "tl",
176  "tn",
177  "to",
178  "tr",
179  "ts",
180  "tt",
181  "tw",
182  "ug",
183  "uk",
184  "ur",
185  "uz",
186  "vi",
187  "vo",
188  "wo",
189  "xh",
190  "yi",
191  "yo",
192  "za",
193  "zh",
194  "zu"
195  );
196  }
+ Here is the caller graph for this function:

◆ getLanguageCode()

ilMDLanguageItem::getLanguageCode ( )

Definition at line 41 of file class.ilMDLanguageItem.php.

References $lang, and $language_code.

41  : string
42  {
43  $lang = self::_getPossibleLanguageCodes();
44  if (in_array($this->language_code, $lang)) {
45  return $this->language_code;
46  }
47  return '';
48  }
$lang
Definition: xapiexit.php:25

Field Documentation

◆ $language_code

string ilMDLanguageItem::$language_code
private

Definition at line 34 of file class.ilMDLanguageItem.php.

Referenced by getLanguageCode().


The documentation for this class was generated from the following file: