1 | <?php |
||
14 | class TranslateUtility |
||
15 | { |
||
16 | /** |
||
17 | * Assure the translation for the given key. |
||
18 | * If not exists create the label in the xml/xlf file. |
||
19 | * Returns the localization. |
||
20 | * |
||
21 | * Use the Slot to handle the label |
||
22 | * |
||
23 | * @see LocalizationUtility::translate |
||
24 | * |
||
25 | * @param string $key key in the localization file |
||
26 | * @param string $extensionName |
||
27 | * @param string $default default value of the label |
||
28 | * @param array $arguments arguments are being passed over to vsprintf |
||
29 | * @param string $tableName |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | public static function assureLabel($key, $extensionName, $default = null, $arguments = null, $tableName = null) |
||
46 | |||
47 | /** |
||
48 | * Get the given LLL String or render a help message for the user. |
||
49 | * |
||
50 | * @param string $key |
||
51 | * @param string $extensionKey |
||
52 | * @param string $tableName |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | public static function getLllOrHelpMessage($key, $extensionKey, $tableName = null) |
||
73 | |||
74 | /** |
||
75 | * Get the correct LLL string for the given key and extension. |
||
76 | * |
||
77 | * @param string $key |
||
78 | * @param $extensionKey |
||
79 | * @param string $file |
||
80 | * @param string $tableName |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | public static function getLllString($key, $extensionKey, $file = null, $tableName = null) |
||
94 | |||
95 | /** |
||
96 | * Get the translation for the given key. |
||
97 | * |
||
98 | * @param string $key |
||
99 | * @param string $extensionKey |
||
100 | * @param string $tableName |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | public static function getLll($key, $extensionKey, $tableName = null) |
||
109 | |||
110 | |||
111 | /** |
||
112 | * Check if table name file base is used |
||
113 | * |
||
114 | * @return bool |
||
115 | */ |
||
116 | static protected function useTableNameFileBase() |
||
121 | } |
||
122 |