chuk-shirley/no-intl

为没有国际化扩展的PHP安装提供的Zend MVC模块

0.1.5 2020-01-09 12:39 UTC

This package is auto-updated.

Last update: 2024-09-09 23:13:27 UTC


README

为没有i18n扩展的PHP安装提供的Zend MVC模块

安装

$ composer require chuk-shirley/no-intl

配置

安装该包后,您需要将模块添加到您的模块配置中。这通常位于 /config/modules.config.php。请确保此模块在 Zend\I18n 之后列出。

return [
    // ... other modules
    'Zend\I18n',
    'NoIntl',
];

如果您想使用除 en_US_POSIX 之外的区域设置,您需要将配置文件从 /config/no_intl.global.php.dist 复制到您的应用程序本地配置目录,移除 .dist 后缀,并在配置数组中指定您的区域设置。

return [
    'no_intl' => [
        'default_locale' => 'en_US_POSIX', // Rename to different locale (e.g. fr-CA, fr-FR, etc.)
    ],
];