Skip to content

Commit fc36c62

Browse files
Added the laravel-lang/locales package
1 parent 32d284f commit fc36c62

File tree

5 files changed

+96
-15
lines changed

5 files changed

+96
-15
lines changed

composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@
4646
},
4747
"require": {
4848
"php": "^8.1",
49-
"laravel-lang/attributes": "^2.3.3",
50-
"laravel-lang/http-statuses": "^3.3.1",
51-
"laravel-lang/lang": "^13.0",
52-
"laravel-lang/publisher": "^14.6.4"
49+
"laravel-lang/attributes": "^2.4.1",
50+
"laravel-lang/http-statuses": "^3.4.5",
51+
"laravel-lang/lang": "^13.2.8",
52+
"laravel-lang/locales": "^1.0",
53+
"laravel-lang/publisher": "^14.7.0"
5354
},
5455
"require-dev": {
55-
"orchestra/testbench": "^8.5 || ^9.0",
56-
"phpunit/phpunit": "^10.0",
57-
"symfony/var-dumper": "^6.3"
56+
"orchestra/testbench": "^8.14",
57+
"phpunit/phpunit": "^10.4.2",
58+
"symfony/var-dumper": "^6.3.6"
5859
},
5960
"minimum-stability": "stable",
6061
"prefer-stable": true,
@@ -66,8 +67,8 @@
6667
"config": {
6768
"allow-plugins": {
6869
"composer/package-versions-deprecated": true,
69-
"ergebnis/composer-normalize": true,
7070
"dragon-code/codestyler": true,
71+
"ergebnis/composer-normalize": true,
7172
"friendsofphp/php-cs-fixer": true,
7273
"symfony/thanks": true
7374
},

docs/.vuepress/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ module.exports = {
5959
collapsible: true,
6060
children: [
6161
'/installation/upgrade-guide/index.md',
62-
'/installation/compatibility/support-policy.md'
62+
'/installation/compatibility/support-policy.md',
63+
'/installation/about.md'
6364
]
6465
},
6566
{

docs/installation/about.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# About
2+
3+
Below is a list of projects we are developing with a description of their purpose.
4+
5+
## `laravel-lang/common`
6+
7+
This package is needed for quick installation and updating of all our projects.
8+
9+
When installing it, all the main packages necessary for working with localizations and translations will be installed
10+
in the application.
11+
12+
## `laravel-lang/locales`
13+
14+
This package contains the core mechanics for working with locales.
15+
16+
It can display the following lists of locales:
17+
18+
- available for installation
19+
- installed locales
20+
- not installed locales
21+
- protected localizations
22+
23+
It can also check that the locale:
24+
25+
- available for installation
26+
- installed in the application
27+
- is protected
28+
29+
In addition, the package can receive the main and backup locales and check them for validity.
30+
31+
It can also work with locale aliases.
32+
33+
## `laravel-lang/publisher`
34+
35+
This package is needed to install translations from plug-in packages.
36+
37+
For example, `laravel-lang/lang`.
38+
39+
## `laravel-lang/lang`
40+
41+
This project contains translations of all available official project keys from the [Laravel](https://laravel.com) team:
42+
43+
- Breeze
44+
- Cashier Stripe
45+
- Fortify
46+
- Jetstream
47+
- Nova
48+
- Spark Aurelius Mollie
49+
- Spark Aurelius
50+
- Spark Paddle
51+
- Spark Stripe
52+
- UI
53+
- Laravel Framework
54+
- Lumen Framework
55+
56+
## `laravel-lang/attributes`
57+
58+
This project contains the translation of custom names for form fields. The list of fields is determined by contributors
59+
and translated by our community.
60+
61+
The specified keys are set to the `attributes` section of the validation error file.
62+
63+
## `laravel-lang/http-statuses`
64+
65+
This project contains translations of all HTTP statuses.
66+
67+
## `laravel-lang/json-fallback-hotfix`
68+
69+
This package solves the problem of using JSON translations in applications where the fallback locale is not English.
70+
71+
Out of the box, Laravel [doesn't allow](https://github.com/laravel/framework/issues/41565#issuecomment-1073572954)
72+
fallback translations for JSON keys.
73+
74+
For example, when you call `__('Remember Me')`, you get `Remember Me` instead of `Se souvenir de moi` for French
75+
fallback language.
76+
77+
This package solves this problem.

docs/installation/compatibility/common.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ title: Common
44

55
# Compatibility: Common
66

7-
| Laravel, Lumen | PHP | Package Version | What packages will be installed | Status |
8-
|----------------|--------------------|-----------------|--------------------------------------------------------------|---------------------------------------|
9-
| 10.x, 11.x | 8.1, 8.2 | `^4.0` | Publisher 14.x, Lang 13.x, Attributes 2.x, HTTP Statuses 3.x | ![Supported][badge_supported] |
10-
| 8.x, 9.x, 10.x | 8.1, 8.2 | `^3.0` | Publisher 14.x, Lang 12.x, Attributes 2.x, HTTP Statuses 3.x | ![Not Supported][badge_not_supported] |
11-
| 7.x, 8.x, 9.x | 8.0, 8.1 | `^2.0` | Publisher 13.x, Lang 10.x, Attributes 1.x, HTTP Statuses 2.x | ![Not Supported][badge_not_supported] |
12-
| 7.x, 8.x, 9.x | 7.3, 7.4, 8.0, 8.1 | `^1.0` | Publisher 12.x, Lang 10.x, Attributes 1.x, HTTP Statuses 2.x | ![Not Supported][badge_not_supported] |
7+
| Laravel, Lumen | PHP | Package Version | What packages will be installed | Status |
8+
|----------------|--------------------|-----------------|---------------------------------------------------------------------------|---------------------------------------|
9+
| 10.x, 11.x | 8.1, 8.2 | `^4.0` | Publisher 14.x, Lang 13.x, Attributes 2.x, HTTP Statuses 3.x, Locales 1.x | ![Supported][badge_supported] |
10+
| 8.x, 9.x, 10.x | 8.1, 8.2 | `^3.0` | Publisher 14.x, Lang 12.x, Attributes 2.x, HTTP Statuses 3.x | ![Not Supported][badge_not_supported] |
11+
| 7.x, 8.x, 9.x | 8.0, 8.1 | `^2.0` | Publisher 13.x, Lang 10.x, Attributes 1.x, HTTP Statuses 2.x | ![Not Supported][badge_not_supported] |
12+
| 7.x, 8.x, 9.x | 7.3, 7.4, 8.0, 8.1 | `^1.0` | Publisher 12.x, Lang 10.x, Attributes 1.x, HTTP Statuses 2.x | ![Not Supported][badge_not_supported] |
1313

1414
[badge_not_supported]: https://img.shields.io/badge/not%20supported-lightgrey?style=flat-square
1515

docs/installation/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ composer require --dev laravel-lang/publisher
3939
composer require --dev laravel-lang/lang
4040
composer require --dev laravel-lang/attributes
4141
composer require --dev laravel-lang/http-statuses
42+
43+
composer require laravel-lang/locales
4244
```

0 commit comments

Comments
 (0)