Tuesday 21 May 2013

Symfony internationalization

The problem was a Unix server which is shipped with an old intl drivers.
The error in the log file is 'request.CRITICAL: Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("The language resource bundle could not be loaded for locale "fr"") '
Download the icu file https://github.com/kbsali/sf2-icu/tree/master/4.2

The solution was to copy the icu files into symfony.
Copy the 4.2 icu to vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/data
Edit the file Locale.php in folder vendor/symfony/symfony/src/Symfony/Component/Locale

    const ICU_DATA_VERSION = '4.2';
Originally it's
    const ICU_DATA_VERSION = '49';




No comments:

Post a Comment