Skip to content

Commit

Permalink
Merge pull request #125 from Laravel-Lang/5.x
Browse files Browse the repository at this point in the history
Added information about `laravel-lang/native-locale-names`
  • Loading branch information
andrey-helldar authored Nov 9, 2023
2 parents 25d3bca + c94977d commit e3bee3f
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,38 @@ jobs:
rm -rf docs/statuses/attributes
rm -rf docs/statuses/http-statuses
rm -rf docs/statuses/lang
rm -rf docs/statuses/native-locale-names
mkdir docs/statuses/attributes
mkdir docs/statuses/http-statuses
mkdir docs/statuses/lang
mkdir docs/statuses/native-locale-names
- name: Download repositories
run: |
git clone --no-tags --single-branch https://github.com/Laravel-Lang/attributes.git tmp/attributes
git clone --no-tags --single-branch https://github.com/Laravel-Lang/http-statuses.git tmp/http-statuses
git clone --no-tags --single-branch https://github.com/Laravel-Lang/lang.git tmp/lang
git clone --no-tags --single-branch https://github.com/Laravel-Lang/native-locale-names.git tmp/native-locale-names
- name: Move translation statuses
run: |
mv -f tmp/attributes/docs/status.md docs/statuses/attributes/index.md
mv -f tmp/http-statuses/docs/status.md docs/statuses/http-statuses/index.md
mv -f tmp/lang/docs/status.md docs/statuses/lang/index.md
mv -f tmp/native-locale-names/docs/status.md docs/statuses/native-locale-names/index.md
mv -f tmp/attributes/docs/statuses docs/statuses/attributes/statuses
mv -f tmp/http-statuses/docs/statuses docs/statuses/http-statuses/statuses
mv -f tmp/lang/docs/statuses docs/statuses/lang/statuses
mv -f tmp/native-locale-names/docs/statuses docs/statuses/native-locale-names/statuses
- name: Resolve page names
run: |
sed -i 's/# Completion Status/# Completion Status: Attributes/g' docs/statuses/attributes/index.md
sed -i 's/# Completion Status/# Completion Status: HTTP Statuses/g' docs/statuses/http-statuses/index.md
sed -i 's/# Completion Status/# Completion Status: Lang/g' docs/statuses/lang/index.md
sed -i 's/# Completion Status/# Completion Status: Native Locale Names/g' docs/statuses/native-locale-names/index.md
- name: Build VuePress site
run: npm run build
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"laravel-lang/http-statuses": "^3.5.0",
"laravel-lang/lang": "^13.3.0",
"laravel-lang/locales": "^1.6",
"laravel-lang/native-locale-names": "^1.0",
"laravel-lang/publisher": "^15.0"
},
"require-dev": {
Expand Down
6 changes: 4 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module.exports = {
{text: 'Lang', link: '/statuses/lang/index.md'},
{text: 'Attributes', link: '/statuses/attributes/index.md'},
{text: 'HTTP Statuses', link: '/statuses/http-statuses/index.md'},
{text: 'Native Locale Names', link: '/statuses/native-locale-names/index.md'},
]
},
],
Expand Down Expand Up @@ -133,9 +134,10 @@ module.exports = {
{
text: 'Features',
children: [
'/usage/features/alignment.md',
'/usage/features/facades.md',
'/usage/features/smart-punctuation.md'
'/usage/features/native-locale-names.md',
'/usage/features/alignment.md',
'/usage/features/smart-punctuation.md',
]
}
]
Expand Down
6 changes: 6 additions & 0 deletions docs/installation/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ For example, when you call `__('Remember Me')`, you get `Remember Me` instead of
fallback language.

This package solves this problem.

## `laravel-lang/native-locale-names`

This package contains a list of localized language names.

I think there is no need to explain why it can be useful 🙂
13 changes: 13 additions & 0 deletions docs/installation/compatibility/native-locale-names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Native Locale Names
---

# Compatibility: Native Locale Names

| PHP | Laravel Lang: Locales | Package Version | Status |
|----------|-----------------------|-----------------|-------------------------------|
| 8.1, 8.2 | `^1.6` | `^1.0` | ![Supported][badge_supported] |

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

[badge_supported]: https://img.shields.io/badge/supported-green?style=flat-square
1 change: 1 addition & 0 deletions docs/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ composer require --dev laravel-lang/attributes
composer require --dev laravel-lang/http-statuses
composer require laravel-lang/locales
composer require laravel-lang/native-locale-names
```
1 change: 1 addition & 0 deletions docs/statuses/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
* [Lang](lang/index.md)
* [Attributes](attributes/index.md)
* [HTTP Statuses](http-statuses/index.md)
* [Native Locale Names](native-locale-names/index.md)
96 changes: 96 additions & 0 deletions docs/usage/features/native-locale-names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Native Locale Names

If you want to get a localized list of languages, then simply call the `Native::get()` method from
the [`laravel-lang/native-locale-names`](../../installation/index.md) package:

```php
use LaravelLang\NativeLocaleNames\Native;

return Native::get('bn');
```

Result:

```php
array:79 [
"af" => "আফ্রিকান"
"ar" => "আরবি"
"az" => "আজারবাইজানীয় (ল্যাটিন)"
"be" => "বেলারুশিয়ান"
"bg" => "বুলগেরিয়ান"
"bn" => "বাংলা"
"bs" => "বসনিয়ান"
"ca" => "কাতালান"
"cs" => "চেক"
"cy" => "ওয়েলশ"
"da" => "ড্যানিশ"
"de" => "জার্মান"
"de_CH" => "সুইস হাই জার্মান"
"el" => "গ্রীক"
"en" => "ইংরেজি"
"es" => "স্পেনীয়"
"et" => "এস্তোনিয়ান"
"eu" => "বাস্ক"
"fa" => "ফার্সি"
"fi" => "ফিনিশ"
"fil" => "ফিলিপিনো"
"fr" => "ফরাসি"
"gl" => "গ্যালিসিয়ান"
"gu" => "গুজরাটি"
"he" => "হিব্রু"
"hi" => "হিন্দি"
"hr" => "ক্রোয়েশিয়ান"
"hu" => "হাঙ্গেরিয়ান"
"hy" => "আর্মেনিয়ান"
"id" => "ইন্দোনেশিয়ান"
"is" => "আইসল্যান্ডিক"
"it" => "ইতালীয়"
"ja" => "জাপানিজ"
"ka" => "জর্জিয়ান"
"kk" => "কাজাখ"
"km" => "খমের"
"kn" => "কন্নড়"
"ko" => "কোরিয়ান"
"lt" => "লিথুয়ানিয়ান"
"lv" => "লাটভিয়ান"
"mk" => "ম্যাসেডোনিয়ান"
"mn" => "মঙ্গোলিয়ান"
"mr" => "মারাঠি"
"ms" => "মলয়"
"nb" => "নরওয়েজিয়ান বোকমাল"
"ne" => "নেপালি"
"nl" => "ডাচ"
"nn" => "নরওয়েজিয়ান নাইনরস্ক"
"oc" => "অক্সিটান"
"pl" => "পোলিশ"
"ps" => "পশতু"
"pt" => "পর্তুগীজ"
"pt_BR" => "ব্রাজিলীয় পর্তুগীজ"
"ro" => "রোমানিয়ান"
"ru" => "রাশিয়ান"
"sc" => "সার্ডিনিয়ান"
"si" => "সিংহল"
"sk" => "স্লোভাক"
"sl" => "স্লোভেন"
"sq" => "আলবেনিয়ান"
"sr_Cyrl" => "সার্বিয়ান (সিরিলিক)"
"sr_Latn" => "সার্বিয়ান (ল্যাটিন)"
"sr_Latn_ME" => "সার্বিয়ান (মন্টিনিগ্রো)"
"sv" => "সুইডিশ"
"sw" => "সোয়াহিলি"
"tg" => "তাজিক (সিরিলিক)"
"th" => "থাই"
"tk" => "তুর্কমেন"
"tl" => "তাগালগ"
"tr" => "তুর্কি"
"ug" => "উইঘুর"
"uk" => "ইউক্রেনীয়"
"ur" => "উর্দু"
"uz_Cyrl" => "উজবেক (সিরিলিক)"
"uz_Latn" => "উজবেক (ল্যাটিন)"
"vi" => "ভিয়েতনামী"
"zh_CN" => "সরলীকৃত চীনা)"
"zh_HK" => "চীনা (হংকং)"
"zh_TW" => "চীনা (তাইওয়ান)"
]
```

0 comments on commit e3bee3f

Please sign in to comment.