Coder Social home page Coder Social logo

meikoudras / locale Goto Github PK

View Code? Open in Web Editor NEW

This project forked from symfony/locale

0.0 2.0 0.0 4.02 MB

[READ-ONLY] Subtree split of the Symfony Locale Component -- clone into Symfony/Component/ (master at symfony/symfony)

Home Page: http://symfony.com/

License: MIT License

PHP 100.00%

locale's Introduction

Locale Component

Locale provides fallback code to handle cases when the intl extension is missing.

Loading the fallback classes for example using the ClassLoader component only requires adding the following lines to your autoloader:

// intl
if (!function_exists('intl_get_error_code')) {
    require __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';

    $loader->registerPrefixFallback(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs');
}

If you are using Composer for autoloading, then you can even simplify it by removing the $loader->registerPrefixFallback line.

Resources

You can run the unit tests with the following command:

$ cd path/to/Symfony/Component/XXX/
$ composer.phar install --dev
$ phpunit

If your PHP have the intl extension enabled but the intl extension ICU data version mismatch the one shipped with the component, you can build the data for it and use the USE_INTL_ICU_DATA_VERSION environment variable.

php Resources/data/build-data.php
export USE_INTL_ICU_DATA_VERSION=true
phpunit

This way the tests will use the ICU data files with the same version of your intl extension.

Read the file Resources/data/UPDATE.txt for more info about building or updating the ICU data files.

locale's People

Contributors

fabpot avatar igorw avatar eriksencosta avatar pborreli avatar stealth35 avatar webmozart avatar seldaek avatar stloyd avatar frosas avatar hason avatar derekroth avatar jakzal avatar rouffj avatar manuelkiessling avatar willdurand avatar lawngnome avatar bamarni avatar stof avatar blue-eyes avatar shieldo avatar slamdunk avatar dlsniper avatar franmomu avatar dotoree avatar istaveren avatar jalliot avatar kriswallsmith avatar lsmith77 avatar mrtorrent avatar pkraeutli avatar

Watchers

James Cloos avatar Meiko Udras avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.