Index: trunk/extensions/ParserFunctions/ParserFunctions.i18n.php.php |
— | — | @@ -1,66 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -/** |
5 | | - * Get translated magic words, if available |
6 | | - * |
7 | | - * @param string $lang Language code |
8 | | - * @return array |
9 | | - */ |
10 | | -function efParserFunctionsWords( $lang ) { |
11 | | - $words = array(); |
12 | | - |
13 | | - /** |
14 | | - * English |
15 | | - */ |
16 | | - $words['en'] = array( |
17 | | - 'expr' => array( 0, 'expr' ), |
18 | | - 'if' => array( 0, 'if' ), |
19 | | - 'ifeq' => array( 0, 'ifeq' ), |
20 | | - 'ifexpr' => array( 0, 'ifexpr' ), |
21 | | - 'switch' => array( 0, 'switch' ), |
22 | | - 'default' => array( 0, '#default' ), |
23 | | - 'ifexist' => array( 0, 'ifexist' ), |
24 | | - 'time' => array( 0, 'time' ), |
25 | | - 'rel2abs' => array( 0, 'rel2abs' ), |
26 | | - 'titleparts' => array( 0, 'titleparts' ), |
27 | | - ); |
28 | | - |
29 | | - /** |
30 | | - * Farsi-Persian |
31 | | - */ |
32 | | - $words['fa'] = array( |
33 | | - 'expr' => array( 0, 'حساب', 'expr' ), |
34 | | - 'if' => array( 0, 'اگر', 'if' ), |
35 | | - 'ifeq' => array( 0, 'اگرمساوی', 'ifeq' ), |
36 | | - 'ifexpr' => array( 0, 'اگرحساب', 'ifexpr' ), |
37 | | - 'switch' => array( 0, 'گزینه', 'switch' ), |
38 | | - 'default' => array( 0, '#پیشفرض', '#default' ), |
39 | | - 'ifexist' => array( 0, 'اگرموجود', 'ifexist' ), |
40 | | - 'time' => array( 0, 'زمان', 'time' ), |
41 | | - 'rel2abs' => array( 0, 'نسبیبهمطلق', 'rel2abs' ), |
42 | | - ); |
43 | | - |
44 | | - /** |
45 | | - * Hebrew |
46 | | - */ |
47 | | - $words['he'] => array( |
48 | | - 'expr' => array( 0, 'חשב', 'expr' ), |
49 | | - 'if' => array( 0, 'תנאי', 'if' ), |
50 | | - 'ifeq' => array( 0, 'שווה', 'ifeq' ), |
51 | | - 'ifexpr' => array( 0, 'חשב תנאי', 'ifexpr' ), |
52 | | - 'switch' => array( 0, 'בחר', 'switch' ), |
53 | | - 'default' => array( 0, '#ברירת מחדל', '#default' ), |
54 | | - 'ifexist' => array( 0, 'קיים', 'ifexist' ), |
55 | | - 'time' => array( 0, 'זמן', 'time' ), |
56 | | - 'rel2abs' => array( 0, 'יחסי למוחלט', 'rel2abs' ), |
57 | | - 'titleparts' => array( 0, 'חלק בכותרת', 'titleparts' ), |
58 | | - ); |
59 | | - |
60 | | - # English is used as a fallback, and the English synonyms are |
61 | | - # used if a translation has not been provided for a given word |
62 | | - return ( $lang == 'en' || !isset( $words[$lang] ) ) |
63 | | - ? $words['en'] |
64 | | - : array_merge( $words['en'], $words[$lang] ); |
65 | | -} |
66 | | - |
67 | | -?> |
\ No newline at end of file |
Index: trunk/extensions/ParserFunctions/ParserFunctions.i18n.php |
— | — | @@ -0,0 +1,66 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Get translated magic words, if available |
| 6 | + * |
| 7 | + * @param string $lang Language code |
| 8 | + * @return array |
| 9 | + */ |
| 10 | +function efParserFunctionsWords( $lang ) { |
| 11 | + $words = array(); |
| 12 | + |
| 13 | + /** |
| 14 | + * English |
| 15 | + */ |
| 16 | + $words['en'] = array( |
| 17 | + 'expr' => array( 0, 'expr' ), |
| 18 | + 'if' => array( 0, 'if' ), |
| 19 | + 'ifeq' => array( 0, 'ifeq' ), |
| 20 | + 'ifexpr' => array( 0, 'ifexpr' ), |
| 21 | + 'switch' => array( 0, 'switch' ), |
| 22 | + 'default' => array( 0, '#default' ), |
| 23 | + 'ifexist' => array( 0, 'ifexist' ), |
| 24 | + 'time' => array( 0, 'time' ), |
| 25 | + 'rel2abs' => array( 0, 'rel2abs' ), |
| 26 | + 'titleparts' => array( 0, 'titleparts' ), |
| 27 | + ); |
| 28 | + |
| 29 | + /** |
| 30 | + * Farsi-Persian |
| 31 | + */ |
| 32 | + $words['fa'] = array( |
| 33 | + 'expr' => array( 0, 'حساب', 'expr' ), |
| 34 | + 'if' => array( 0, 'اگر', 'if' ), |
| 35 | + 'ifeq' => array( 0, 'اگرمساوی', 'ifeq' ), |
| 36 | + 'ifexpr' => array( 0, 'اگرحساب', 'ifexpr' ), |
| 37 | + 'switch' => array( 0, 'گزینه', 'switch' ), |
| 38 | + 'default' => array( 0, '#پیشفرض', '#default' ), |
| 39 | + 'ifexist' => array( 0, 'اگرموجود', 'ifexist' ), |
| 40 | + 'time' => array( 0, 'زمان', 'time' ), |
| 41 | + 'rel2abs' => array( 0, 'نسبیبهمطلق', 'rel2abs' ), |
| 42 | + ); |
| 43 | + |
| 44 | + /** |
| 45 | + * Hebrew |
| 46 | + */ |
| 47 | + $words['he'] => array( |
| 48 | + 'expr' => array( 0, 'חשב', 'expr' ), |
| 49 | + 'if' => array( 0, 'תנאי', 'if' ), |
| 50 | + 'ifeq' => array( 0, 'שווה', 'ifeq' ), |
| 51 | + 'ifexpr' => array( 0, 'חשב תנאי', 'ifexpr' ), |
| 52 | + 'switch' => array( 0, 'בחר', 'switch' ), |
| 53 | + 'default' => array( 0, '#ברירת מחדל', '#default' ), |
| 54 | + 'ifexist' => array( 0, 'קיים', 'ifexist' ), |
| 55 | + 'time' => array( 0, 'זמן', 'time' ), |
| 56 | + 'rel2abs' => array( 0, 'יחסי למוחלט', 'rel2abs' ), |
| 57 | + 'titleparts' => array( 0, 'חלק בכותרת', 'titleparts' ), |
| 58 | + ); |
| 59 | + |
| 60 | + # English is used as a fallback, and the English synonyms are |
| 61 | + # used if a translation has not been provided for a given word |
| 62 | + return ( $lang == 'en' || !isset( $words[$lang] ) ) |
| 63 | + ? $words['en'] |
| 64 | + : array_merge( $words['en'], $words[$lang] ); |
| 65 | +} |
| 66 | + |
| 67 | +?> |
\ No newline at end of file |
Property changes on: trunk/extensions/ParserFunctions/ParserFunctions.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 68 | + native |