本文整理匯總了PHP中Translation::makeLanguage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Translation::makeLanguage方法的具體用法?PHP Translation::makeLanguage怎麽用?PHP Translation::makeLanguage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Translation
的用法示例。
在下文中一共展示了Translation::makeLanguage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Translation
freepbx::out("\t\tMerge from master to this branch failed");
freepbx::out("Module " . $module . " will not be tagged!");
continue;
}
freepbx::out("Done");
if ($stashable) {
$repo->apply_stash();
$repo->drop_stash();
}
freepbx::out("\tProcessing localizations...");
freepbx::outn("\t\tUpdating master localization...");
$translation = new Translation($repodir);
if (!preg_match('/(core|framework)$/i', $repodir)) {
//if no i18n folder then make an english one!
if (!file_exists($repodir . '/i18n')) {
$translation->makeLanguage("en_US");
}
//pray that this works..
$translation->update_i18n();
freepbx::out("Done");
foreach (glob($repodir . '/i18n/*', GLOB_ONLYDIR) as $langDir) {
$lang = basename($langDir);
freepbx::outn("\t\tUpdating individual localization for " . $lang);
$o = $translation->merge_i18n($lang);
freepbx::out($o);
}
} elseif (preg_match('/framework$/i', $repodir)) {
$translation->update_i18n_amp();
foreach (glob($repodir . '/amp_conf/htdocs/admin/i18n/*', GLOB_ONLYDIR) as $langDir) {
$lang = basename($langDir);
freepbx::outn("\t\tUpdating individual localization for " . $lang);
示例2: Translation
freepbx::out("Module " . $module . " will not be tagged!");
continue;
}
freepbx::out("Done");
if ($stashable) {
$repo->apply_stash();
$repo->drop_stash();
}
}
freepbx::out("\tProcessing localizations...");
freepbx::outn("\t\tUpdating master localization...");
$translation = new Translation($mod_dir);
if (!preg_match('/(core|framework)$/i', $mod_dir)) {
//if no i18n folder then make a spanish one!
if (!file_exists($mod_dir . '/i18n')) {
$translation->makeLanguage("es_ES");
}
//pray that this works..
$translation->update_i18n();
freepbx::out("Done");
foreach (glob($mod_dir . '/i18n/*', GLOB_ONLYDIR) as $langDir) {
$lang = basename($langDir);
freepbx::outn("\t\tUpdating individual localization for " . $lang);
$o = $translation->merge_i18n($lang);
freepbx::out($o);
}
} elseif (preg_match('/framework$/i', $mod_dir)) {
$translation->update_i18n_amp();
foreach (glob($mod_dir . '/amp_conf/htdocs/admin/i18n/*', GLOB_ONLYDIR) as $langDir) {
$lang = basename($langDir);
freepbx::outn("\t\tUpdating individual localization for " . $lang);