Created
November 4, 2013 16:58
-
-
Save mudrd8mz/7305694 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Put this file into the dirroot of your Moodle 2.6beta and execute it, e.g. | |
// | |
// $ sudo -u apache php bg_locale_test.php | |
// | |
// Please report results to David or at MDLSITE-2580 | |
define('CLI_SCRIPT', 1); | |
require_once(__DIR__.'/config.php'); | |
$requested = 'bg_BG.UTF-8'; // as defined in bg.zip::langconfig.php | |
if (class_exists('Collator', false)) { | |
$collator = new Collator($requested); | |
$errorcode = $collator->getErrorCode(); | |
$errormessage = $collator->getErrorMessage(); | |
$actual = $collator->getLocale(Locale::ACTUAL_LOCALE); | |
$valid = $collator->getLocale(Locale::VALID_LOCALE); | |
fputs(STDOUT, sprintf("---- | |
requested: %s | |
actual: %s | |
valid: %s | |
errorcode: %s | |
errormessage: %s | |
---- | |
", $requested, $actual, $valid, $errorcode, $errormessage)); | |
} else { | |
fputs(STDERR, 'Collator class not found.'.PHP_EOL); | |
exit(1); | |
} |
requested: bg_BG.UTF-8
actual: bg
valid: bg
errorcode: -128
errormessage: U_USING_FALLBACK_WARNING
(macosx, php 5.4)
requested: bg_BG.UTF-8
actual: bg
valid: bg
errorcode: -128
errormessage: U_USING_FALLBACK_WARNING
macports php 5.5.5
requested: bg_BG.UTF-8
actual: ru
valid: bg
errorcode: -128
errormessage: U_USING_FALLBACK_WARNING
Linux version 2.6.32-5-amd64 (Debian 2.6.32-48squeeze3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
requested: bg_BG.UTF-8
actual: ru
valid: bg
errorcode: -128
errormessage: U_USING_FALLBACK_WARNING