Loading validator messages

skala
Julio Montoya 11 years ago
parent b11ad75af6
commit 11a7e7ea5f
  1. 8
      main/inc/global.inc.php
  2. 3
      main/inc/lib/internationalization_internal.lib.php

@ -712,6 +712,10 @@ $app->before(
}
}
$translator->addLoader('xlf', new Symfony\Component\Translation\Loader\XliffFileLoader());
$translator->addResource('xlf', api_get_path(SYS_PATH).'vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.sr_Latn.xlf', 'sr_Latn', 'validators');
/*$translator->addLoader('mofile', new MoFileLoader());
$filePath = api_get_path(SYS_PATH).'main/locale/'.$locale.'.mo';
if (!file_exists($filePath)) {
@ -720,6 +724,10 @@ $app->before(
$translator->addResource('mofile', $filePath, $locale);*/
return $translator;
}
}));
// Check if we are inside a Chamilo course tool

@ -185,8 +185,9 @@ function _api_get_person_name_convention($language, $type) {
$language = api_purify_language_id($language);
if (!isset($conventions)) {
$file = dirname(__FILE__).'/internationalization_database/name_order_conventions.php';
if (file_exists($file)) {
$conventions = include ($file);
$conventions = include $file;
} else {
$conventions = array('english' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'));
}

Loading…
Cancel
Save