1 | <?php |
---|
2 | /* |
---|
3 | * --:: JPEG MetaDatas ::------------------------------------------------------- |
---|
4 | * |
---|
5 | * Author : Grum |
---|
6 | * email : grum at piwigo.org |
---|
7 | * website : http://photos.grum.fr |
---|
8 | * |
---|
9 | * << May the Little SpaceFrog be with you ! >> |
---|
10 | * |
---|
11 | * |
---|
12 | * +-----------------------------------------------------------------------+ |
---|
13 | * | JpegMetaData - a PHP based Jpeg Metadata manager | |
---|
14 | * +-----------------------------------------------------------------------+ |
---|
15 | * | Copyright(C) 2010 Grum - http://www.grum.fr | |
---|
16 | * +-----------------------------------------------------------------------+ |
---|
17 | * | This program is free software; you can redistribute it and/or modify | |
---|
18 | * | it under the terms of the GNU General Public License as published by | |
---|
19 | * | the Free Software Foundation | |
---|
20 | * | | |
---|
21 | * | This program is distributed in the hope that it will be useful, but | |
---|
22 | * | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
23 | * | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
24 | * | General Public License for more details. | |
---|
25 | * | | |
---|
26 | * | You should have received a copy of the GNU General Public License | |
---|
27 | * | along with this program; if not, write to the Free Software | |
---|
28 | * | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
29 | * | USA. | |
---|
30 | * +-----------------------------------------------------------------------+ |
---|
31 | * |
---|
32 | * |
---|
33 | * ----------------------------------------------------------------------------- |
---|
34 | * |
---|
35 | * The Locale class is used for tag translation, reading the .mo files |
---|
36 | * |
---|
37 | * ----------------------------------------------------------------------------- |
---|
38 | * |
---|
39 | * |
---|
40 | * ----------------------------------------------------------------------------- |
---|
41 | */ |
---|
42 | |
---|
43 | |
---|
44 | require_once(JPEG_METADATA_DIR."External/php-gettext/gettext.inc"); |
---|
45 | |
---|
46 | $supported_locales = array('en_UK'); |
---|
47 | |
---|
48 | class Locale |
---|
49 | { |
---|
50 | const JMD_TAG = "Tag"; |
---|
51 | const JMD_TAGDESC = "TagDesc"; |
---|
52 | |
---|
53 | static function set($language) |
---|
54 | { |
---|
55 | T_setlocale(LC_MESSAGES, $language); |
---|
56 | |
---|
57 | T_bindtextdomain(self::JMD_TAG, dirname(dirname(__FILE__))."/Locale"); |
---|
58 | T_bindtextdomain(self::JMD_TAGDESC, dirname(dirname(__FILE__))."/Locale"); |
---|
59 | } |
---|
60 | |
---|
61 | static function get($tagName) |
---|
62 | { |
---|
63 | return(@T_dgettext(self::JMD_TAG, $tagName)); |
---|
64 | } |
---|
65 | |
---|
66 | static function getDesc($tagName) |
---|
67 | { |
---|
68 | return(@T_dgettext(self::JMD_TAGDESC, $tagName)); |
---|
69 | } |
---|
70 | |
---|
71 | } |
---|
72 | |
---|
73 | |
---|
74 | ?> |
---|