Skip to content

Commit

Permalink
fix wrong locale on Alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry committed Mar 11, 2020
1 parent cc50010 commit 075453a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Provide your application in multiple languages, to users in various countries, w

## Installation

1. Include the library via Composer [[?]](https://github.com/delight-im/Knowledge/blob/master/Composer%20(PHP).md):
1. Include the library via Composer:

```bash
$ composer require delight-im/i18n
$ composer require haiz/i18n
```

1. Include the Composer autoloader:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "delight-im/i18n",
"name": "haiz/i18n",
"description": "Internationalization and localization for PHP",
"require": {
"php": ">=5.6.0",
Expand All @@ -8,7 +8,7 @@
},
"type": "library",
"keywords": [ "internationalization", "localization", "translation", "language", "locale", "gettext", "intl", "i18n", "l10n" ],
"homepage": "https://github.com/delight-im/PHP-I18N",
"homepage": "https://github.com/haiz/PHP-I18N",
"license": "MIT",
"autoload": {
"psr-4": {
Expand Down
1 change: 1 addition & 0 deletions src/I18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ private function setLocale($code) {
);

if (!empty($systemLocale)) {
$systemLocale = \str_replace('-', '_', $systemLocale);
\setlocale(\LC_NUMERIC, $systemLocale);
\setlocale(\LC_TIME, $systemLocale);
\setlocale(\LC_MONETARY, $systemLocale);
Expand Down

0 comments on commit 075453a

Please sign in to comment.