Changeset 1021
- Timestamp:
- 01/11/07 07:24:40 (2 years ago)
- Files:
-
- branches/wheeljack/php/lib/function.MTAssetType.php (modified) (1 diff)
- branches/wheeljack/php/lib/l10n_ja.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/wheeljack/php/lib/function.MTAssetType.php
r821 r1021 1 1 <?php 2 2 function smarty_function_MTAssetType($args, &$ctx) { 3 global $mt; 4 $lang = $mt->config['DefaultLanguage']; 5 if (!preg_match('/^en/i', $lang)) 6 @require_once("l10n_$lang.php"); 7 else 8 @require_once("l10n_en.php"); 9 3 10 $asset = $ctx->stash('asset'); 4 11 if (!$asset) return ''; 5 12 6 return $asset['asset_class'];13 return translate_phrase($asset['asset_class']); 7 14 } 8 15 ?> branches/wheeljack/php/lib/l10n_ja.php
r50 r1021 1 1 <?php 2 $Lexicon_ja = array( 2 global $Lexicon; 3 $Lexicon = array( 3 4 ## default_templates.pl 4 5 'Continue reading' => 'ç¶ããèªã', … … 80 81 'Continuing the discussion...' => 'ãã©ãã¯ããã¯', 81 82 'from' => ',', 83 'file' => 'ãã¡ã€ã«', 84 'image' => 'ç»å', 82 85 ); 86 83 87 function translate_phrase($str, $params = null) { 84 global $Lexicon , $Lexicon_ja;85 $l10n_str = isset($Lexicon _ja[$str]) ? $Lexicon_ja[$str] : isset($Lexicon[$str])? $Lexicon[$str] : $str;88 global $Lexicon; 89 $l10n_str = isset($Lexicon[$str]) == true ? $Lexicon[$str] : $str; 86 90 if (extension_loaded('mbstring')) { 87 91 $str = mb_convert_encoding($l10n_str,mb_internal_encoding(),"UTF-8");
