本文整理汇总了PHP中Localize::GetMissingTranslations方法的典型用法代码示例。如果您正苦于以下问题:PHP Localize::GetMissingTranslations方法的具体用法?PHP Localize::GetMissingTranslations怎么用?PHP Localize::GetMissingTranslations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Localize
的用法示例。
在下文中一共展示了Localize::GetMissingTranslations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
if (!empty(Config::$_authorizedDomains)) {
array_walk(Config::$_authorizedDomains, function (&$domain) {
$domain = strtolower($domain);
});
if (!in_array(strtolower($_SERVER['HTTP_HOST']), Config::$_authorizedDomains)) {
die("This domain is not authorized to access this software!<br /><br />(Did you forget to add your domains/subdomains to the \$_authorizedDomains array in the configuration class file?)");
}
}
// Configure localization
$countryCode = !isset($_GET['ccode']) ? !isset($_SESSION['ccode']) ? Config::_DEFAULT_COUNTRY : $_SESSION['ccode'] : trim($_GET['ccode']);
if (!isset($_SESSION['langs']) || !isset($_SESSION['translations']) || !isset($_SESSION['missingTranslations']) || !isset($_SESSION['ccode']) || $_SESSION['ccode'] != $countryCode) {
$localize = new Localize($countryCode);
$_SESSION['ccode'] = $countryCode;
$_SESSION['langs'] = $localize->GetLocalizationInfo();
$_SESSION['translations'] = $localize->GetTranslations();
$_SESSION['missingTranslations'] = $localize->GetMissingTranslations();
}
foreach ($_SESSION['translations'] as $constant => $value) {
$value = isset($_SESSION['missingTranslations'][$constant]) && $_SESSION['langs'][$_SESSION['ccode']]['direction'] == 'rtl' ? '<span dir="' . Localize::_FALLBACK_DIRECTION . '">' . $value . '</span>' : $value;
define($constant, $value);
}
// If localization just changed, urldecode everything in $_GET that was encoded by http_build_query()
if (isset($_GET['ccode'])) {
foreach ($_GET as $k => $v) {
$_GET[$k] = urldecode($v);
}
}
// Instantiate converter class and populate vars/arrays
$converter = new VideoConverter();
$videoHosts = $converter->GetVideoHosts();
$uniqueFtypes = $ftypes = $converter->GetConvertedFileTypes();