Author: franiglesias
(2012/02/13 13:41) 3 months ago
Fixing language inconsistences
439
{
440
App::import('Core', 'L10n');
441
$L10n = new L10n();
442
$locale = $L10n->get($L10n->locale);
return $L10n->lang;
443
$language = str_replace('_', '-', $locale);
// $locale = $L10n->get($L10n->locale);
444
return $language;
// $language = str_replace('_', '-', $locale);
445
// return $language;
}
446
447
448
...
495
*/
496
public function multi($message, $default)
497
498
$reponses = array();
499
$responses = array();
$finish = false;
500
$this->out($message);
501
do {
502
$response = $this->in($message);
503
$response = $this->in($message, null, $default);
$this->out($response);
504
if ($response != 'q') {
505
$message .= ', '.$response;
506
521
return true;
522
523
524
525
public function testLang()
public function getLang() {
526
$lang = $this->language();
527
$this->out($this->language());
$this->out($lang);
528
529
530
{{App::import('Core', 'L10n');App::import('Core', 'L10n');$locale = $L10n->get($L10n->locale);return $L10n->lang;$language = str_replace('_', '-', $locale);// $locale = $L10n->get($L10n->locale);return $language;// $language = str_replace('_', '-', $locale);// return $language;{{$responses = array();do {do {$response = $this->in($message, null, $default);if ($response != 'q') {if ($response != 'q') {public function testLang()public function getLang() {{$lang = $this->language();$this->out($this->language());$this->out($lang);