|
3 | 3 | Perhaps the facades will be useful to you: |
4 | 4 |
|
5 | 5 | ```php |
6 | | -use LaravelLang\Publisher\Facades\Helpers\Locales; |
| 6 | +use LaravelLang\Locales\Facades\Locales; |
| 7 | +use LaravelLang\Locales\Enums\Locale; |
7 | 8 |
|
8 | 9 | // List of available localizations. |
9 | 10 | Locales::available(): array |
10 | 11 |
|
11 | 12 | // List of installed localizations. |
12 | 13 | Locales::installed(): array |
13 | 14 |
|
14 | | -// List of installed localizations without protected codes. |
15 | | -Locales::installedWithoutProtects(): array |
16 | | - |
17 | 15 | // List of uninstalled localizations. |
18 | 16 | Locales::notInstalled(): array |
19 | 17 |
|
20 | 18 | // Retrieving a list of protected locales. |
21 | 19 | Locales::protects(): array |
22 | 20 |
|
23 | 21 | // Check if language packs are available in requested locale. |
24 | | -Locales::isAvailable(LocaleCode|string|null $locale): bool |
| 22 | +Locales::isAvailable(Locale|string|null $locale): bool |
25 | 23 |
|
26 | 24 | // Check if a language pack is installed. |
27 | | -Locales::isInstalled(LocaleCode|string|null $locale): bool |
| 25 | +Locales::isInstalled(Locale|string|null $locale): bool |
28 | 26 |
|
29 | 27 | // The checked locale protecting. |
30 | | -Locales::isProtected(LocaleCode|string|null $locale): bool |
| 28 | +Locales::isProtected(Locale|string|null $locale): bool |
31 | 29 |
|
32 | 30 | // Getting the default localization name. |
33 | 31 | Locales::getDefault(): string |
34 | 32 |
|
35 | 33 | // Getting the fallback localization name. |
36 | 34 | Locales::getFallback(): string |
37 | 35 | ``` |
| 36 | + |
| 37 | +To use this functionality, make sure you have |
| 38 | +the [laravel-lang/locales](../../installation/about.md#laravel-lang-locales) package installed. |
0 commit comments