langswitch
This commit is contained in:
parent
ad42e73126
commit
8d91d0e7a8
13
app/Helpers/utils.php
Normal file
13
app/Helpers/utils.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* Get an associative array with localeCodes as keys and translated URLs of current page as value
|
||||
*/
|
||||
function getLocalizedURLArray()
|
||||
{
|
||||
$localesOrdered = LaravelLocalization::getLocalesOrder();
|
||||
$localizedURLs = array();
|
||||
foreach ($localesOrdered as $localeCode => $properties) {
|
||||
$localizedURLs[$localeCode] = LaravelLocalization::getLocalizedURL($localeCode, null, [], true);
|
||||
}
|
||||
return $localizedURLs;
|
||||
}
|
42
app/Http/Controllers/Frontend/LocalizationController.php
Normal file
42
app/Http/Controllers/Frontend/LocalizationController.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Frontend;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Session;
|
||||
use App;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class LocalizationController extends Controller
|
||||
{
|
||||
|
||||
// public function index(Request $request,$locale){
|
||||
// //set’s application’s locale
|
||||
// app()->setLocale($locale);
|
||||
|
||||
// //Gets the translated message and displays it
|
||||
// echo trans('lang.msg');
|
||||
// }
|
||||
|
||||
public function index()
|
||||
{
|
||||
return view('localization.index');
|
||||
}
|
||||
|
||||
public function setLocale($lang)
|
||||
{
|
||||
//if action is post method:
|
||||
//$lang = Input::get('language');
|
||||
|
||||
|
||||
//Session::put('locale', $lang);
|
||||
Session::put(['locale' => $lang]);
|
||||
// Session::save();
|
||||
|
||||
//return redirect(url(URL::previous()));
|
||||
return Redirect::back();
|
||||
// echo trans('document.msg');
|
||||
}
|
||||
}
|
|
@ -33,7 +33,7 @@ class Kernel extends HttpKernel
|
|||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
//\Opus4\Http\Middleware\Locale::class,
|
||||
\App\Http\Middleware\Locale::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
|
|
33
app/Http/Middleware/Locale.php
Normal file
33
app/Http/Middleware/Locale.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Session;
|
||||
use App;
|
||||
use Config;
|
||||
|
||||
class Locale
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
// if(!Session::has('locale'))
|
||||
// {
|
||||
// Session::put('locale', Config::get('app.locale'));
|
||||
// }
|
||||
$language = Session::get('locale', Config::get('app.locale'));
|
||||
// $data = Session::all();
|
||||
// $language =Session::get('locale1');
|
||||
|
||||
|
||||
App::setLocale($language);
|
||||
return $next($request);
|
||||
}
|
||||
}
|
|
@ -1,34 +1,35 @@
|
|||
<?php namespace App\Providers;
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider {
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* This service provider is a great spot to register your various container
|
||||
* bindings with the application. As you can see, we are registering our
|
||||
* "Registrar" implementation here. You can add your own bindings too!
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->bind(
|
||||
'Illuminate\Contracts\Auth\Registrar'
|
||||
// 'App\Services\Registrar'
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* This service provider is a great spot to register your various container
|
||||
* bindings with the application. As you can see, we are registering our
|
||||
* "Registrar" implementation here. You can add your own bindings too!
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->bind(
|
||||
'Illuminate\Contracts\Auth\Registrar'
|
||||
// 'App\Services\Registrar'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,46 +5,46 @@ namespace App\Providers;
|
|||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* This namespace is applied to the controller routes in your routes file.
|
||||
*
|
||||
* In addition, it is set as the URL generator's root namespace.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $namespace = 'App\Http\Controllers';
|
||||
/**
|
||||
* This namespace is applied to the controller routes in your routes file.
|
||||
*
|
||||
* In addition, it is set as the URL generator's root namespace.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $namespace = 'App\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
//
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function map()
|
||||
{
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function map()
|
||||
{
|
||||
//Route::group(['namespace' => $this->namespace], function()
|
||||
//{
|
||||
// require app_path('Http/routes.php');
|
||||
//});
|
||||
$this->mapApiRoutes();
|
||||
//});
|
||||
$this->mapApiRoutes();
|
||||
$this->mapWebRoutes();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "web" routes for the application.
|
||||
|
@ -58,9 +58,9 @@ class RouteServiceProvider extends ServiceProvider
|
|||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
}
|
||||
|
||||
/**
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"laravel/framework": "5.5.*",
|
||||
"laravel/tinker": "~1.0",
|
||||
"laravelcollective/html": "^5.5.0",
|
||||
"mcamara/laravel-localization": "^1.3",
|
||||
"solarium/solarium": "^3.8",
|
||||
"yajra/laravel-datatables-oracle": "^8.8",
|
||||
"zizaco/entrust": "^1.9"
|
||||
|
@ -27,6 +28,9 @@
|
|||
"squizlabs/php_codesniffer": "^3.3"
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"app/Helpers/utils.php"
|
||||
],
|
||||
"classmap": [
|
||||
"database/seeds",
|
||||
"database/factories"
|
||||
|
|
89
composer.lock
generated
89
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "4342eadf905adb22061f8d3fe0bf6d97",
|
||||
"content-hash": "5fc9158bb6717b040ab326b41203677b",
|
||||
"packages": [
|
||||
{
|
||||
"name": "davejamesmiller/laravel-breadcrumbs",
|
||||
|
@ -990,6 +990,68 @@
|
|||
],
|
||||
"time": "2018-10-15T13:53:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mcamara/laravel-localization",
|
||||
"version": "1.3.16",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mcamara/laravel-localization.git",
|
||||
"reference": "e82a6c9d809b82afb7ae226f18ac3cb077a18754"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/e82a6c9d809b82afb7ae226f18ac3cb077a18754",
|
||||
"reference": "e82a6c9d809b82afb7ae226f18ac3cb077a18754",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"laravel/framework": "~5.2.0||~5.3.0||~5.4.0||~5.5.0||~5.6.0||~5.7.0",
|
||||
"php": ">=7.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench-browser-kit": "~3.4",
|
||||
"phpunit/phpunit": "6.0.*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Mcamara\\LaravelLocalization\\LaravelLocalizationServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"LaravelLocalization": "Mcamara\\LaravelLocalization\\Facades\\LaravelLocalization"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [],
|
||||
"psr-0": {
|
||||
"Mcamara\\LaravelLocalization": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Marc Cámara",
|
||||
"email": "mcamara88@gmail.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Easy localization for Laravel",
|
||||
"homepage": "https://github.com/mcamara/laravel-localization",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"localization",
|
||||
"php"
|
||||
],
|
||||
"time": "2018-10-30T06:33:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "1.24.0",
|
||||
|
@ -1114,16 +1176,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "1.34.1",
|
||||
"version": "1.35.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "19201b87f7dba2a7cbf1cccdf0e1da13c04ee9c9"
|
||||
"reference": "5c05a2be472b22f63291d192410df9f0e0de3b19"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/19201b87f7dba2a7cbf1cccdf0e1da13c04ee9c9",
|
||||
"reference": "19201b87f7dba2a7cbf1cccdf0e1da13c04ee9c9",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/5c05a2be472b22f63291d192410df9f0e0de3b19",
|
||||
"reference": "5c05a2be472b22f63291d192410df9f0e0de3b19",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1131,9 +1193,12 @@
|
|||
"symfony/translation": "~2.6 || ~3.0 || ~4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "~2",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7"
|
||||
},
|
||||
"suggest": {
|
||||
"friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.",
|
||||
"phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
|
@ -1165,7 +1230,7 @@
|
|||
"datetime",
|
||||
"time"
|
||||
],
|
||||
"time": "2018-11-08T13:33:47+00:00"
|
||||
"time": "2018-11-14T21:55:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
|
@ -2652,16 +2717,16 @@
|
|||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables-oracle",
|
||||
"version": "v8.9.2",
|
||||
"version": "v8.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yajra/laravel-datatables.git",
|
||||
"reference": "3b084b9b7b4aac46f0bfc2d71b9b3a67d794f4e9"
|
||||
"reference": "f9a9714918037c5b92645a7beb63370db0ecc172"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/3b084b9b7b4aac46f0bfc2d71b9b3a67d794f4e9",
|
||||
"reference": "3b084b9b7b4aac46f0bfc2d71b9b3a67d794f4e9",
|
||||
"url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/f9a9714918037c5b92645a7beb63370db0ecc172",
|
||||
"reference": "f9a9714918037c5b92645a7beb63370db0ecc172",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2719,7 +2784,7 @@
|
|||
"jquery",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2018-10-30T14:23:18+00:00"
|
||||
"time": "2018-11-20T04:34:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "zizaco/entrust",
|
||||
|
|
328
config/laravellocalization.php
Normal file
328
config/laravellocalization.php
Normal file
|
@ -0,0 +1,328 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
// Uncomment the languages that your site supports - or add new ones.
|
||||
// These are sorted by the native name, which is the order you might show them in a language selector.
|
||||
// Regional languages are sorted by their base language, so "British English" sorts as "English, British"
|
||||
'supportedLocales' => [
|
||||
//'ace' => ['name' => 'Achinese', 'script' => 'Latn', 'native' => 'Aceh', 'regional' => ''],
|
||||
//'af' => ['name' => 'Afrikaans', 'script' => 'Latn', 'native' => 'Afrikaans', 'regional' => 'af_ZA'],
|
||||
//'agq' => ['name' => 'Aghem', 'script' => 'Latn', 'native' => 'Aghem', 'regional' => ''],
|
||||
//'ak' => ['name' => 'Akan', 'script' => 'Latn', 'native' => 'Akan', 'regional' => 'ak_GH'],
|
||||
//'an' => ['name' => 'Aragonese', 'script' => 'Latn', 'native' => 'aragonés', 'regional' => 'an_ES'],
|
||||
//'cch' => ['name' => 'Atsam', 'script' => 'Latn', 'native' => 'Atsam', 'regional' => ''],
|
||||
//'gn' => ['name' => 'Guaraní', 'script' => 'Latn', 'native' => 'Avañe’ẽ', 'regional' => ''],
|
||||
//'ae' => ['name' => 'Avestan', 'script' => 'Latn', 'native' => 'avesta', 'regional' => ''],
|
||||
//'ay' => ['name' => 'Aymara', 'script' => 'Latn', 'native' => 'aymar aru', 'regional' => 'ay_PE'],
|
||||
//'az' => ['name' => 'Azerbaijani (Latin)', 'script' => 'Latn', 'native' => 'azərbaycanca', 'regional' => 'az_AZ'],
|
||||
//'id' => ['name' => 'Indonesian', 'script' => 'Latn', 'native' => 'Bahasa Indonesia', 'regional' => 'id_ID'],
|
||||
//'ms' => ['name' => 'Malay', 'script' => 'Latn', 'native' => 'Bahasa Melayu', 'regional' => 'ms_MY'],
|
||||
//'bm' => ['name' => 'Bambara', 'script' => 'Latn', 'native' => 'bamanakan', 'regional' => ''],
|
||||
//'jv' => ['name' => 'Javanese (Latin)', 'script' => 'Latn', 'native' => 'Basa Jawa', 'regional' => ''],
|
||||
//'su' => ['name' => 'Sundanese', 'script' => 'Latn', 'native' => 'Basa Sunda', 'regional' => ''],
|
||||
//'bh' => ['name' => 'Bihari', 'script' => 'Latn', 'native' => 'Bihari', 'regional' => ''],
|
||||
//'bi' => ['name' => 'Bislama', 'script' => 'Latn', 'native' => 'Bislama', 'regional' => ''],
|
||||
//'nb' => ['name' => 'Norwegian Bokmål', 'script' => 'Latn', 'native' => 'Bokmål', 'regional' => 'nb_NO'],
|
||||
//'bs' => ['name' => 'Bosnian', 'script' => 'Latn', 'native' => 'bosanski', 'regional' => 'bs_BA'],
|
||||
//'br' => ['name' => 'Breton', 'script' => 'Latn', 'native' => 'brezhoneg', 'regional' => 'br_FR'],
|
||||
//'ca' => ['name' => 'Catalan', 'script' => 'Latn', 'native' => 'català', 'regional' => 'ca_ES'],
|
||||
//'ch' => ['name' => 'Chamorro', 'script' => 'Latn', 'native' => 'Chamoru', 'regional' => ''],
|
||||
//'ny' => ['name' => 'Chewa', 'script' => 'Latn', 'native' => 'chiCheŵa', 'regional' => ''],
|
||||
//'kde' => ['name' => 'Makonde', 'script' => 'Latn', 'native' => 'Chimakonde', 'regional' => ''],
|
||||
//'sn' => ['name' => 'Shona', 'script' => 'Latn', 'native' => 'chiShona', 'regional' => ''],
|
||||
//'co' => ['name' => 'Corsican', 'script' => 'Latn', 'native' => 'corsu', 'regional' => ''],
|
||||
//'cy' => ['name' => 'Welsh', 'script' => 'Latn', 'native' => 'Cymraeg', 'regional' => 'cy_GB'],
|
||||
//'da' => ['name' => 'Danish', 'script' => 'Latn', 'native' => 'dansk', 'regional' => 'da_DK'],
|
||||
//'se' => ['name' => 'Northern Sami', 'script' => 'Latn', 'native' => 'davvisámegiella', 'regional' => 'se_NO'],
|
||||
'de' => ['name' => 'German', 'script' => 'Latn', 'native' => 'Deutsch', 'regional' => 'de_DE'],
|
||||
//'luo' => ['name' => 'Luo', 'script' => 'Latn', 'native' => 'Dholuo', 'regional' => ''],
|
||||
//'nv' => ['name' => 'Navajo', 'script' => 'Latn', 'native' => 'Diné bizaad', 'regional' => ''],
|
||||
//'dua' => ['name' => 'Duala', 'script' => 'Latn', 'native' => 'duálá', 'regional' => ''],
|
||||
//'et' => ['name' => 'Estonian', 'script' => 'Latn', 'native' => 'eesti', 'regional' => 'et_EE'],
|
||||
//'na' => ['name' => 'Nauru', 'script' => 'Latn', 'native' => 'Ekakairũ Naoero', 'regional' => ''],
|
||||
//'guz' => ['name' => 'Ekegusii', 'script' => 'Latn', 'native' => 'Ekegusii', 'regional' => ''],
|
||||
'en' => ['name' => 'English', 'script' => 'Latn', 'native' => 'English', 'regional' => 'en_GB'],
|
||||
//'en-AU' => ['name' => 'Australian English', 'script' => 'Latn', 'native' => 'Australian English', 'regional' => 'en_AU'],
|
||||
//'en-GB' => ['name' => 'British English', 'script' => 'Latn', 'native' => 'British English', 'regional' => 'en_GB'],
|
||||
//'en-US' => ['name' => 'U.S. English', 'script' => 'Latn', 'native' => 'U.S. English', 'regional' => 'en_US'],
|
||||
'es' => ['name' => 'Spanish', 'script' => 'Latn', 'native' => 'español', 'regional' => 'es_ES'],
|
||||
//'eo' => ['name' => 'Esperanto', 'script' => 'Latn', 'native' => 'esperanto', 'regional' => ''],
|
||||
//'eu' => ['name' => 'Basque', 'script' => 'Latn', 'native' => 'euskara', 'regional' => 'eu_ES'],
|
||||
//'ewo' => ['name' => 'Ewondo', 'script' => 'Latn', 'native' => 'ewondo', 'regional' => ''],
|
||||
//'ee' => ['name' => 'Ewe', 'script' => 'Latn', 'native' => 'eʋegbe', 'regional' => ''],
|
||||
//'fil' => ['name' => 'Filipino', 'script' => 'Latn', 'native' => 'Filipino', 'regional' => 'fil_PH'],
|
||||
//'fr' => ['name' => 'French', 'script' => 'Latn', 'native' => 'français', 'regional' => 'fr_FR'],
|
||||
//'fr-CA' => ['name' => 'Canadian French', 'script' => 'Latn', 'native' => 'français canadien', 'regional' => 'fr_CA'],
|
||||
//'fy' => ['name' => 'Western Frisian', 'script' => 'Latn', 'native' => 'frysk', 'regional' => 'fy_DE'],
|
||||
//'fur' => ['name' => 'Friulian', 'script' => 'Latn', 'native' => 'furlan', 'regional' => 'fur_IT'],
|
||||
//'fo' => ['name' => 'Faroese', 'script' => 'Latn', 'native' => 'føroyskt', 'regional' => 'fo_FO'],
|
||||
//'gaa' => ['name' => 'Ga', 'script' => 'Latn', 'native' => 'Ga', 'regional' => ''],
|
||||
//'ga' => ['name' => 'Irish', 'script' => 'Latn', 'native' => 'Gaeilge', 'regional' => 'ga_IE'],
|
||||
//'gv' => ['name' => 'Manx', 'script' => 'Latn', 'native' => 'Gaelg', 'regional' => 'gv_GB'],
|
||||
//'sm' => ['name' => 'Samoan', 'script' => 'Latn', 'native' => 'Gagana fa’a Sāmoa', 'regional' => ''],
|
||||
//'gl' => ['name' => 'Galician', 'script' => 'Latn', 'native' => 'galego', 'regional' => 'gl_ES'],
|
||||
//'ki' => ['name' => 'Kikuyu', 'script' => 'Latn', 'native' => 'Gikuyu', 'regional' => ''],
|
||||
//'gd' => ['name' => 'Scottish Gaelic', 'script' => 'Latn', 'native' => 'Gàidhlig', 'regional' => 'gd_GB'],
|
||||
//'ha' => ['name' => 'Hausa', 'script' => 'Latn', 'native' => 'Hausa', 'regional' => 'ha_NG'],
|
||||
//'bez' => ['name' => 'Bena', 'script' => 'Latn', 'native' => 'Hibena', 'regional' => ''],
|
||||
//'ho' => ['name' => 'Hiri Motu', 'script' => 'Latn', 'native' => 'Hiri Motu', 'regional' => ''],
|
||||
//'hr' => ['name' => 'Croatian', 'script' => 'Latn', 'native' => 'hrvatski', 'regional' => 'hr_HR'],
|
||||
//'bem' => ['name' => 'Bemba', 'script' => 'Latn', 'native' => 'Ichibemba', 'regional' => 'bem_ZM'],
|
||||
//'io' => ['name' => 'Ido', 'script' => 'Latn', 'native' => 'Ido', 'regional' => ''],
|
||||
//'ig' => ['name' => 'Igbo', 'script' => 'Latn', 'native' => 'Igbo', 'regional' => 'ig_NG'],
|
||||
//'rn' => ['name' => 'Rundi', 'script' => 'Latn', 'native' => 'Ikirundi', 'regional' => ''],
|
||||
//'ia' => ['name' => 'Interlingua', 'script' => 'Latn', 'native' => 'interlingua', 'regional' => 'ia_FR'],
|
||||
//'iu-Latn' => ['name' => 'Inuktitut (Latin)', 'script' => 'Latn', 'native' => 'Inuktitut', 'regional' => 'iu_CA'],
|
||||
//'sbp' => ['name' => 'Sileibi', 'script' => 'Latn', 'native' => 'Ishisangu', 'regional' => ''],
|
||||
//'nd' => ['name' => 'North Ndebele', 'script' => 'Latn', 'native' => 'isiNdebele', 'regional' => ''],
|
||||
//'nr' => ['name' => 'South Ndebele', 'script' => 'Latn', 'native' => 'isiNdebele', 'regional' => 'nr_ZA'],
|
||||
//'xh' => ['name' => 'Xhosa', 'script' => 'Latn', 'native' => 'isiXhosa', 'regional' => 'xh_ZA'],
|
||||
//'zu' => ['name' => 'Zulu', 'script' => 'Latn', 'native' => 'isiZulu', 'regional' => 'zu_ZA'],
|
||||
//'it' => ['name' => 'Italian', 'script' => 'Latn', 'native' => 'italiano', 'regional' => 'it_IT'],
|
||||
//'ik' => ['name' => 'Inupiaq', 'script' => 'Latn', 'native' => 'Iñupiaq', 'regional' => 'ik_CA'],
|
||||
//'dyo' => ['name' => 'Jola-Fonyi', 'script' => 'Latn', 'native' => 'joola', 'regional' => ''],
|
||||
//'kea' => ['name' => 'Kabuverdianu', 'script' => 'Latn', 'native' => 'kabuverdianu', 'regional' => ''],
|
||||
//'kaj' => ['name' => 'Jju', 'script' => 'Latn', 'native' => 'Kaje', 'regional' => ''],
|
||||
//'mh' => ['name' => 'Marshallese', 'script' => 'Latn', 'native' => 'Kajin M̧ajeļ', 'regional' => 'mh_MH'],
|
||||
//'kl' => ['name' => 'Kalaallisut', 'script' => 'Latn', 'native' => 'kalaallisut', 'regional' => 'kl_GL'],
|
||||
//'kln' => ['name' => 'Kalenjin', 'script' => 'Latn', 'native' => 'Kalenjin', 'regional' => ''],
|
||||
//'kr' => ['name' => 'Kanuri', 'script' => 'Latn', 'native' => 'Kanuri', 'regional' => ''],
|
||||
//'kcg' => ['name' => 'Tyap', 'script' => 'Latn', 'native' => 'Katab', 'regional' => ''],
|
||||
//'kw' => ['name' => 'Cornish', 'script' => 'Latn', 'native' => 'kernewek', 'regional' => 'kw_GB'],
|
||||
//'naq' => ['name' => 'Nama', 'script' => 'Latn', 'native' => 'Khoekhoegowab', 'regional' => ''],
|
||||
//'rof' => ['name' => 'Rombo', 'script' => 'Latn', 'native' => 'Kihorombo', 'regional' => ''],
|
||||
//'kam' => ['name' => 'Kamba', 'script' => 'Latn', 'native' => 'Kikamba', 'regional' => ''],
|
||||
//'kg' => ['name' => 'Kongo', 'script' => 'Latn', 'native' => 'Kikongo', 'regional' => ''],
|
||||
//'jmc' => ['name' => 'Machame', 'script' => 'Latn', 'native' => 'Kimachame', 'regional' => ''],
|
||||
//'rw' => ['name' => 'Kinyarwanda', 'script' => 'Latn', 'native' => 'Kinyarwanda', 'regional' => 'rw_RW'],
|
||||
//'asa' => ['name' => 'Kipare', 'script' => 'Latn', 'native' => 'Kipare', 'regional' => ''],
|
||||
//'rwk' => ['name' => 'Rwa', 'script' => 'Latn', 'native' => 'Kiruwa', 'regional' => ''],
|
||||
//'saq' => ['name' => 'Samburu', 'script' => 'Latn', 'native' => 'Kisampur', 'regional' => ''],
|
||||
//'ksb' => ['name' => 'Shambala', 'script' => 'Latn', 'native' => 'Kishambaa', 'regional' => ''],
|
||||
//'swc' => ['name' => 'Congo Swahili', 'script' => 'Latn', 'native' => 'Kiswahili ya Kongo', 'regional' => ''],
|
||||
//'sw' => ['name' => 'Swahili', 'script' => 'Latn', 'native' => 'Kiswahili', 'regional' => 'sw_KE'],
|
||||
//'dav' => ['name' => 'Dawida', 'script' => 'Latn', 'native' => 'Kitaita', 'regional' => ''],
|
||||
//'teo' => ['name' => 'Teso', 'script' => 'Latn', 'native' => 'Kiteso', 'regional' => ''],
|
||||
//'khq' => ['name' => 'Koyra Chiini', 'script' => 'Latn', 'native' => 'Koyra ciini', 'regional' => ''],
|
||||
//'ses' => ['name' => 'Songhay', 'script' => 'Latn', 'native' => 'Koyraboro senni', 'regional' => ''],
|
||||
//'mfe' => ['name' => 'Morisyen', 'script' => 'Latn', 'native' => 'kreol morisien', 'regional' => ''],
|
||||
//'ht' => ['name' => 'Haitian', 'script' => 'Latn', 'native' => 'Kreyòl ayisyen', 'regional' => 'ht_HT'],
|
||||
//'kj' => ['name' => 'Kuanyama', 'script' => 'Latn', 'native' => 'Kwanyama', 'regional' => ''],
|
||||
//'ksh' => ['name' => 'Kölsch', 'script' => 'Latn', 'native' => 'Kölsch', 'regional' => ''],
|
||||
//'ebu' => ['name' => 'Kiembu', 'script' => 'Latn', 'native' => 'Kĩembu', 'regional' => ''],
|
||||
//'mer' => ['name' => 'Kimîîru', 'script' => 'Latn', 'native' => 'Kĩmĩrũ', 'regional' => ''],
|
||||
//'lag' => ['name' => 'Langi', 'script' => 'Latn', 'native' => 'Kɨlaangi', 'regional' => ''],
|
||||
//'lah' => ['name' => 'Lahnda', 'script' => 'Latn', 'native' => 'Lahnda', 'regional' => ''],
|
||||
//'la' => ['name' => 'Latin', 'script' => 'Latn', 'native' => 'latine', 'regional' => ''],
|
||||
//'lv' => ['name' => 'Latvian', 'script' => 'Latn', 'native' => 'latviešu', 'regional' => 'lv_LV'],
|
||||
//'to' => ['name' => 'Tongan', 'script' => 'Latn', 'native' => 'lea fakatonga', 'regional' => ''],
|
||||
//'lt' => ['name' => 'Lithuanian', 'script' => 'Latn', 'native' => 'lietuvių', 'regional' => 'lt_LT'],
|
||||
//'li' => ['name' => 'Limburgish', 'script' => 'Latn', 'native' => 'Limburgs', 'regional' => 'li_BE'],
|
||||
//'ln' => ['name' => 'Lingala', 'script' => 'Latn', 'native' => 'lingála', 'regional' => ''],
|
||||
//'lg' => ['name' => 'Ganda', 'script' => 'Latn', 'native' => 'Luganda', 'regional' => 'lg_UG'],
|
||||
//'luy' => ['name' => 'Oluluyia', 'script' => 'Latn', 'native' => 'Luluhia', 'regional' => ''],
|
||||
//'lb' => ['name' => 'Luxembourgish', 'script' => 'Latn', 'native' => 'Lëtzebuergesch', 'regional' => 'lb_LU'],
|
||||
//'hu' => ['name' => 'Hungarian', 'script' => 'Latn', 'native' => 'magyar', 'regional' => 'hu_HU'],
|
||||
//'mgh' => ['name' => 'Makhuwa-Meetto', 'script' => 'Latn', 'native' => 'Makua', 'regional' => ''],
|
||||
//'mg' => ['name' => 'Malagasy', 'script' => 'Latn', 'native' => 'Malagasy', 'regional' => 'mg_MG'],
|
||||
//'mt' => ['name' => 'Maltese', 'script' => 'Latn', 'native' => 'Malti', 'regional' => 'mt_MT'],
|
||||
//'mtr' => ['name' => 'Mewari', 'script' => 'Latn', 'native' => 'Mewari', 'regional' => ''],
|
||||
//'mua' => ['name' => 'Mundang', 'script' => 'Latn', 'native' => 'Mundang', 'regional' => ''],
|
||||
//'mi' => ['name' => 'Māori', 'script' => 'Latn', 'native' => 'Māori', 'regional' => 'mi_NZ'],
|
||||
//'nl' => ['name' => 'Dutch', 'script' => 'Latn', 'native' => 'Nederlands', 'regional' => 'nl_NL'],
|
||||
//'nmg' => ['name' => 'Kwasio', 'script' => 'Latn', 'native' => 'ngumba', 'regional' => ''],
|
||||
//'yav' => ['name' => 'Yangben', 'script' => 'Latn', 'native' => 'nuasue', 'regional' => ''],
|
||||
//'nn' => ['name' => 'Norwegian Nynorsk', 'script' => 'Latn', 'native' => 'nynorsk', 'regional' => 'nn_NO'],
|
||||
//'oc' => ['name' => 'Occitan', 'script' => 'Latn', 'native' => 'occitan', 'regional' => 'oc_FR'],
|
||||
//'ang' => ['name' => 'Old English', 'script' => 'Runr', 'native' => 'Old English', 'regional' => ''],
|
||||
//'xog' => ['name' => 'Soga', 'script' => 'Latn', 'native' => 'Olusoga', 'regional' => ''],
|
||||
//'om' => ['name' => 'Oromo', 'script' => 'Latn', 'native' => 'Oromoo', 'regional' => 'om_ET'],
|
||||
//'ng' => ['name' => 'Ndonga', 'script' => 'Latn', 'native' => 'OshiNdonga', 'regional' => ''],
|
||||
//'hz' => ['name' => 'Herero', 'script' => 'Latn', 'native' => 'Otjiherero', 'regional' => ''],
|
||||
//'uz-Latn' => ['name' => 'Uzbek (Latin)', 'script' => 'Latn', 'native' => 'oʼzbekcha', 'regional' => 'uz_UZ'],
|
||||
//'nds' => ['name' => 'Low German', 'script' => 'Latn', 'native' => 'Plattdüütsch', 'regional' => 'nds_DE'],
|
||||
//'pl' => ['name' => 'Polish', 'script' => 'Latn', 'native' => 'polski', 'regional' => 'pl_PL'],
|
||||
//'pt' => ['name' => 'Portuguese', 'script' => 'Latn', 'native' => 'português', 'regional' => 'pt_PT'],
|
||||
//'pt-BR' => ['name' => 'Brazilian Portuguese', 'script' => 'Latn', 'native' => 'português do Brasil', 'regional' => 'pt_BR'],
|
||||
//'ff' => ['name' => 'Fulah', 'script' => 'Latn', 'native' => 'Pulaar', 'regional' => 'ff_SN'],
|
||||
//'pi' => ['name' => 'Pahari-Potwari', 'script' => 'Latn', 'native' => 'Pāli', 'regional' => ''],
|
||||
//'aa' => ['name' => 'Afar', 'script' => 'Latn', 'native' => 'Qafar', 'regional' => 'aa_ER'],
|
||||
//'ty' => ['name' => 'Tahitian', 'script' => 'Latn', 'native' => 'Reo Māohi', 'regional' => ''],
|
||||
//'ksf' => ['name' => 'Bafia', 'script' => 'Latn', 'native' => 'rikpa', 'regional' => ''],
|
||||
//'ro' => ['name' => 'Romanian', 'script' => 'Latn', 'native' => 'română', 'regional' => 'ro_RO'],
|
||||
//'cgg' => ['name' => 'Chiga', 'script' => 'Latn', 'native' => 'Rukiga', 'regional' => ''],
|
||||
//'rm' => ['name' => 'Romansh', 'script' => 'Latn', 'native' => 'rumantsch', 'regional' => ''],
|
||||
//'qu' => ['name' => 'Quechua', 'script' => 'Latn', 'native' => 'Runa Simi', 'regional' => ''],
|
||||
//'nyn' => ['name' => 'Nyankole', 'script' => 'Latn', 'native' => 'Runyankore', 'regional' => ''],
|
||||
//'ssy' => ['name' => 'Saho', 'script' => 'Latn', 'native' => 'Saho', 'regional' => ''],
|
||||
//'sc' => ['name' => 'Sardinian', 'script' => 'Latn', 'native' => 'sardu', 'regional' => 'sc_IT'],
|
||||
//'de-CH' => ['name' => 'Swiss High German', 'script' => 'Latn', 'native' => 'Schweizer Hochdeutsch', 'regional' => 'de_CH'],
|
||||
//'gsw' => ['name' => 'Swiss German', 'script' => 'Latn', 'native' => 'Schwiizertüütsch', 'regional' => ''],
|
||||
//'trv' => ['name' => 'Taroko', 'script' => 'Latn', 'native' => 'Seediq', 'regional' => ''],
|
||||
//'seh' => ['name' => 'Sena', 'script' => 'Latn', 'native' => 'sena', 'regional' => ''],
|
||||
//'nso' => ['name' => 'Northern Sotho', 'script' => 'Latn', 'native' => 'Sesotho sa Leboa', 'regional' => 'nso_ZA'],
|
||||
//'st' => ['name' => 'Southern Sotho', 'script' => 'Latn', 'native' => 'Sesotho', 'regional' => 'st_ZA'],
|
||||
//'tn' => ['name' => 'Tswana', 'script' => 'Latn', 'native' => 'Setswana', 'regional' => 'tn_ZA'],
|
||||
//'sq' => ['name' => 'Albanian', 'script' => 'Latn', 'native' => 'shqip', 'regional' => 'sq_AL'],
|
||||
//'sid' => ['name' => 'Sidamo', 'script' => 'Latn', 'native' => 'Sidaamu Afo', 'regional' => 'sid_ET'],
|
||||
//'ss' => ['name' => 'Swati', 'script' => 'Latn', 'native' => 'Siswati', 'regional' => 'ss_ZA'],
|
||||
//'sk' => ['name' => 'Slovak', 'script' => 'Latn', 'native' => 'slovenčina', 'regional' => 'sk_SK'],
|
||||
//'sl' => ['name' => 'Slovene', 'script' => 'Latn', 'native' => 'slovenščina', 'regional' => 'sl_SI'],
|
||||
//'so' => ['name' => 'Somali', 'script' => 'Latn', 'native' => 'Soomaali', 'regional' => 'so_SO'],
|
||||
//'sr-Latn' => ['name' => 'Serbian (Latin)', 'script' => 'Latn', 'native' => 'Srpski', 'regional' => 'sr_RS'],
|
||||
//'sh' => ['name' => 'Serbo-Croatian', 'script' => 'Latn', 'native' => 'srpskohrvatski', 'regional' => ''],
|
||||
//'fi' => ['name' => 'Finnish', 'script' => 'Latn', 'native' => 'suomi', 'regional' => 'fi_FI'],
|
||||
//'sv' => ['name' => 'Swedish', 'script' => 'Latn', 'native' => 'svenska', 'regional' => 'sv_SE'],
|
||||
//'sg' => ['name' => 'Sango', 'script' => 'Latn', 'native' => 'Sängö', 'regional' => ''],
|
||||
//'tl' => ['name' => 'Tagalog', 'script' => 'Latn', 'native' => 'Tagalog', 'regional' => 'tl_PH'],
|
||||
//'tzm-Latn' => ['name' => 'Central Atlas Tamazight (Latin)', 'script' => 'Latn', 'native' => 'Tamazight', 'regional' => ''],
|
||||
//'kab' => ['name' => 'Kabyle', 'script' => 'Latn', 'native' => 'Taqbaylit', 'regional' => 'kab_DZ'],
|
||||
//'twq' => ['name' => 'Tasawaq', 'script' => 'Latn', 'native' => 'Tasawaq senni', 'regional' => ''],
|
||||
//'shi' => ['name' => 'Tachelhit (Latin)', 'script' => 'Latn', 'native' => 'Tashelhit', 'regional' => ''],
|
||||
//'nus' => ['name' => 'Nuer', 'script' => 'Latn', 'native' => 'Thok Nath', 'regional' => ''],
|
||||
//'vi' => ['name' => 'Vietnamese', 'script' => 'Latn', 'native' => 'Tiếng Việt', 'regional' => 'vi_VN'],
|
||||
//'tg-Latn' => ['name' => 'Tajik (Latin)', 'script' => 'Latn', 'native' => 'tojikī', 'regional' => 'tg_TJ'],
|
||||
//'lu' => ['name' => 'Luba-Katanga', 'script' => 'Latn', 'native' => 'Tshiluba', 'regional' => 've_ZA'],
|
||||
//'ve' => ['name' => 'Venda', 'script' => 'Latn', 'native' => 'Tshivenḓa', 'regional' => ''],
|
||||
//'tw' => ['name' => 'Twi', 'script' => 'Latn', 'native' => 'Twi', 'regional' => ''],
|
||||
//'tr' => ['name' => 'Turkish', 'script' => 'Latn', 'native' => 'Türkçe', 'regional' => 'tr_TR'],
|
||||
//'ale' => ['name' => 'Aleut', 'script' => 'Latn', 'native' => 'Unangax tunuu', 'regional' => ''],
|
||||
//'ca-valencia' => ['name' => 'Valencian', 'script' => 'Latn', 'native' => 'valencià', 'regional' => ''],
|
||||
//'vai-Latn' => ['name' => 'Vai (Latin)', 'script' => 'Latn', 'native' => 'Viyamíĩ', 'regional' => ''],
|
||||
//'vo' => ['name' => 'Volapük', 'script' => 'Latn', 'native' => 'Volapük', 'regional' => ''],
|
||||
//'fj' => ['name' => 'Fijian', 'script' => 'Latn', 'native' => 'vosa Vakaviti', 'regional' => ''],
|
||||
//'wa' => ['name' => 'Walloon', 'script' => 'Latn', 'native' => 'Walon', 'regional' => 'wa_BE'],
|
||||
//'wae' => ['name' => 'Walser', 'script' => 'Latn', 'native' => 'Walser', 'regional' => 'wae_CH'],
|
||||
//'wen' => ['name' => 'Sorbian', 'script' => 'Latn', 'native' => 'Wendic', 'regional' => ''],
|
||||
//'wo' => ['name' => 'Wolof', 'script' => 'Latn', 'native' => 'Wolof', 'regional' => 'wo_SN'],
|
||||
//'ts' => ['name' => 'Tsonga', 'script' => 'Latn', 'native' => 'Xitsonga', 'regional' => 'ts_ZA'],
|
||||
//'dje' => ['name' => 'Zarma', 'script' => 'Latn', 'native' => 'Zarmaciine', 'regional' => ''],
|
||||
//'yo' => ['name' => 'Yoruba', 'script' => 'Latn', 'native' => 'Èdè Yorùbá', 'regional' => 'yo_NG'],
|
||||
//'de-AT' => ['name' => 'Austrian German', 'script' => 'Latn', 'native' => 'Österreichisches Deutsch', 'regional' => 'de_AT'],
|
||||
//'is' => ['name' => 'Icelandic', 'script' => 'Latn', 'native' => 'íslenska', 'regional' => 'is_IS'],
|
||||
//'cs' => ['name' => 'Czech', 'script' => 'Latn', 'native' => 'čeština', 'regional' => 'cs_CZ'],
|
||||
//'bas' => ['name' => 'Basa', 'script' => 'Latn', 'native' => 'Ɓàsàa', 'regional' => ''],
|
||||
//'mas' => ['name' => 'Masai', 'script' => 'Latn', 'native' => 'ɔl-Maa', 'regional' => ''],
|
||||
//'haw' => ['name' => 'Hawaiian', 'script' => 'Latn', 'native' => 'ʻŌlelo Hawaiʻi', 'regional' => ''],
|
||||
//'el' => ['name' => 'Greek', 'script' => 'Grek', 'native' => 'Ελληνικά', 'regional' => 'el_GR'],
|
||||
//'uz' => ['name' => 'Uzbek (Cyrillic)', 'script' => 'Cyrl', 'native' => 'Ўзбек', 'regional' => 'uz_UZ'],
|
||||
//'az-Cyrl' => ['name' => 'Azerbaijani (Cyrillic)', 'script' => 'Cyrl', 'native' => 'Азәрбајҹан', 'regional' => 'uz_UZ'],
|
||||
//'ab' => ['name' => 'Abkhazian', 'script' => 'Cyrl', 'native' => 'Аҧсуа', 'regional' => ''],
|
||||
//'os' => ['name' => 'Ossetic', 'script' => 'Cyrl', 'native' => 'Ирон', 'regional' => 'os_RU'],
|
||||
//'ky' => ['name' => 'Kyrgyz', 'script' => 'Cyrl', 'native' => 'Кыргыз', 'regional' => 'ky_KG'],
|
||||
//'sr' => ['name' => 'Serbian (Cyrillic)', 'script' => 'Cyrl', 'native' => 'Српски', 'regional' => 'sr_RS'],
|
||||
//'av' => ['name' => 'Avaric', 'script' => 'Cyrl', 'native' => 'авар мацӀ', 'regional' => ''],
|
||||
//'ady' => ['name' => 'Adyghe', 'script' => 'Cyrl', 'native' => 'адыгэбзэ', 'regional' => ''],
|
||||
//'ba' => ['name' => 'Bashkir', 'script' => 'Cyrl', 'native' => 'башҡорт теле', 'regional' => ''],
|
||||
//'be' => ['name' => 'Belarusian', 'script' => 'Cyrl', 'native' => 'беларуская', 'regional' => 'be_BY'],
|
||||
//'bg' => ['name' => 'Bulgarian', 'script' => 'Cyrl', 'native' => 'български', 'regional' => 'bg_BG'],
|
||||
//'kv' => ['name' => 'Komi', 'script' => 'Cyrl', 'native' => 'коми кыв', 'regional' => ''],
|
||||
//'mk' => ['name' => 'Macedonian', 'script' => 'Cyrl', 'native' => 'македонски', 'regional' => 'mk_MK'],
|
||||
//'mn' => ['name' => 'Mongolian (Cyrillic)', 'script' => 'Cyrl', 'native' => 'монгол', 'regional' => 'mn_MN'],
|
||||
//'ce' => ['name' => 'Chechen', 'script' => 'Cyrl', 'native' => 'нохчийн мотт', 'regional' => 'ce_RU'],
|
||||
//'ru' => ['name' => 'Russian', 'script' => 'Cyrl', 'native' => 'русский', 'regional' => 'ru_RU'],
|
||||
//'sah' => ['name' => 'Yakut', 'script' => 'Cyrl', 'native' => 'саха тыла', 'regional' => ''],
|
||||
//'tt' => ['name' => 'Tatar', 'script' => 'Cyrl', 'native' => 'татар теле', 'regional' => 'tt_RU'],
|
||||
//'tg' => ['name' => 'Tajik (Cyrillic)', 'script' => 'Cyrl', 'native' => 'тоҷикӣ', 'regional' => 'tg_TJ'],
|
||||
//'tk' => ['name' => 'Turkmen', 'script' => 'Cyrl', 'native' => 'түркменче', 'regional' => 'tk_TM'],
|
||||
//'uk' => ['name' => 'Ukrainian', 'script' => 'Cyrl', 'native' => 'українська', 'regional' => 'uk_UA'],
|
||||
//'cv' => ['name' => 'Chuvash', 'script' => 'Cyrl', 'native' => 'чӑваш чӗлхи', 'regional' => 'cv_RU'],
|
||||
//'cu' => ['name' => 'Church Slavic', 'script' => 'Cyrl', 'native' => 'ѩзыкъ словѣньскъ', 'regional' => ''],
|
||||
//'kk' => ['name' => 'Kazakh', 'script' => 'Cyrl', 'native' => 'қазақ тілі', 'regional' => 'kk_KZ'],
|
||||
//'hy' => ['name' => 'Armenian', 'script' => 'Armn', 'native' => 'Հայերեն', 'regional' => 'hy_AM'],
|
||||
//'yi' => ['name' => 'Yiddish', 'script' => 'Hebr', 'native' => 'ייִדיש', 'regional' => 'yi_US'],
|
||||
//'he' => ['name' => 'Hebrew', 'script' => 'Hebr', 'native' => 'עברית', 'regional' => 'he_IL'],
|
||||
//'ug' => ['name' => 'Uyghur', 'script' => 'Arab', 'native' => 'ئۇيغۇرچە', 'regional' => 'ug_CN'],
|
||||
//'ur' => ['name' => 'Urdu', 'script' => 'Arab', 'native' => 'اردو', 'regional' => 'ur_PK'],
|
||||
//'ar' => ['name' => 'Arabic', 'script' => 'Arab', 'native' => 'العربية', 'regional' => 'ar_AE'],
|
||||
//'uz-Arab' => ['name' => 'Uzbek (Arabic)', 'script' => 'Arab', 'native' => 'اۉزبېک', 'regional' => ''],
|
||||
//'tg-Arab' => ['name' => 'Tajik (Arabic)', 'script' => 'Arab', 'native' => 'تاجیکی', 'regional' => 'tg_TJ'],
|
||||
//'sd' => ['name' => 'Sindhi', 'script' => 'Arab', 'native' => 'سنڌي', 'regional' => 'sd_IN'],
|
||||
//'fa' => ['name' => 'Persian', 'script' => 'Arab', 'native' => 'فارسی', 'regional' => 'fa_IR'],
|
||||
//'pa-Arab' => ['name' => 'Punjabi (Arabic)', 'script' => 'Arab', 'native' => 'پنجاب', 'regional' => 'pa_IN'],
|
||||
//'ps' => ['name' => 'Pashto', 'script' => 'Arab', 'native' => 'پښتو', 'regional' => 'ps_AF'],
|
||||
//'ks' => ['name' => 'Kashmiri (Arabic)', 'script' => 'Arab', 'native' => 'کأشُر', 'regional' => 'ks_IN'],
|
||||
//'ku' => ['name' => 'Kurdish', 'script' => 'Arab', 'native' => 'کوردی', 'regional' => 'ku_TR'],
|
||||
//'dv' => ['name' => 'Divehi', 'script' => 'Thaa', 'native' => 'ދިވެހިބަސް', 'regional' => 'dv_MV'],
|
||||
//'ks-Deva' => ['name' => 'Kashmiri (Devaganari)', 'script' => 'Deva', 'native' => 'कॉशुर', 'regional' => 'ks_IN'],
|
||||
//'kok' => ['name' => 'Konkani', 'script' => 'Deva', 'native' => 'कोंकणी', 'regional' => 'kok_IN'],
|
||||
//'doi' => ['name' => 'Dogri', 'script' => 'Deva', 'native' => 'डोगरी', 'regional' => 'doi_IN'],
|
||||
//'ne' => ['name' => 'Nepali', 'script' => 'Deva', 'native' => 'नेपाली', 'regional' => ''],
|
||||
//'pra' => ['name' => 'Prakrit', 'script' => 'Deva', 'native' => 'प्राकृत', 'regional' => ''],
|
||||
//'brx' => ['name' => 'Bodo', 'script' => 'Deva', 'native' => 'बड़ो', 'regional' => 'brx_IN'],
|
||||
//'bra' => ['name' => 'Braj', 'script' => 'Deva', 'native' => 'ब्रज भाषा', 'regional' => ''],
|
||||
//'mr' => ['name' => 'Marathi', 'script' => 'Deva', 'native' => 'मराठी', 'regional' => 'mr_IN'],
|
||||
//'mai' => ['name' => 'Maithili', 'script' => 'Tirh', 'native' => 'मैथिली', 'regional' => 'mai_IN'],
|
||||
//'raj' => ['name' => 'Rajasthani', 'script' => 'Deva', 'native' => 'राजस्थानी', 'regional' => ''],
|
||||
//'sa' => ['name' => 'Sanskrit', 'script' => 'Deva', 'native' => 'संस्कृतम्', 'regional' => 'sa_IN'],
|
||||
//'hi' => ['name' => 'Hindi', 'script' => 'Deva', 'native' => 'हिन्दी', 'regional' => 'hi_IN'],
|
||||
//'as' => ['name' => 'Assamese', 'script' => 'Beng', 'native' => 'অসমীয়া', 'regional' => 'as_IN'],
|
||||
//'bn' => ['name' => 'Bengali', 'script' => 'Beng', 'native' => 'বাংলা', 'regional' => 'bn_BD'],
|
||||
//'mni' => ['name' => 'Manipuri', 'script' => 'Beng', 'native' => 'মৈতৈ', 'regional' => 'mni_IN'],
|
||||
//'pa' => ['name' => 'Punjabi (Gurmukhi)', 'script' => 'Guru', 'native' => 'ਪੰਜਾਬੀ', 'regional' => 'pa_IN'],
|
||||
//'gu' => ['name' => 'Gujarati', 'script' => 'Gujr', 'native' => 'ગુજરાતી', 'regional' => 'gu_IN'],
|
||||
//'or' => ['name' => 'Oriya', 'script' => 'Orya', 'native' => 'ଓଡ଼ିଆ', 'regional' => 'or_IN'],
|
||||
//'ta' => ['name' => 'Tamil', 'script' => 'Taml', 'native' => 'தமிழ்', 'regional' => 'ta_IN'],
|
||||
//'te' => ['name' => 'Telugu', 'script' => 'Telu', 'native' => 'తెలుగు', 'regional' => 'te_IN'],
|
||||
//'kn' => ['name' => 'Kannada', 'script' => 'Knda', 'native' => 'ಕನ್ನಡ', 'regional' => 'kn_IN'],
|
||||
//'ml' => ['name' => 'Malayalam', 'script' => 'Mlym', 'native' => 'മലയാളം', 'regional' => 'ml_IN'],
|
||||
//'si' => ['name' => 'Sinhala', 'script' => 'Sinh', 'native' => 'සිංහල', 'regional' => 'si_LK'],
|
||||
//'th' => ['name' => 'Thai', 'script' => 'Thai', 'native' => 'ไทย', 'regional' => 'th_TH'],
|
||||
//'lo' => ['name' => 'Lao', 'script' => 'Laoo', 'native' => 'ລາວ', 'regional' => 'lo_LA'],
|
||||
//'bo' => ['name' => 'Tibetan', 'script' => 'Tibt', 'native' => 'པོད་སྐད་', 'regional' => 'bo_IN'],
|
||||
//'dz' => ['name' => 'Dzongkha', 'script' => 'Tibt', 'native' => 'རྫོང་ཁ', 'regional' => 'dz_BT'],
|
||||
//'my' => ['name' => 'Burmese', 'script' => 'Mymr', 'native' => 'မြန်မာဘာသာ', 'regional' => 'my_MM'],
|
||||
//'ka' => ['name' => 'Georgian', 'script' => 'Geor', 'native' => 'ქართული', 'regional' => 'ka_GE'],
|
||||
//'byn' => ['name' => 'Blin', 'script' => 'Ethi', 'native' => 'ብሊን', 'regional' => 'byn_ER'],
|
||||
//'tig' => ['name' => 'Tigre', 'script' => 'Ethi', 'native' => 'ትግረ', 'regional' => 'tig_ER'],
|
||||
//'ti' => ['name' => 'Tigrinya', 'script' => 'Ethi', 'native' => 'ትግርኛ', 'regional' => 'ti_ET'],
|
||||
//'am' => ['name' => 'Amharic', 'script' => 'Ethi', 'native' => 'አማርኛ', 'regional' => 'am_ET'],
|
||||
//'wal' => ['name' => 'Wolaytta', 'script' => 'Ethi', 'native' => 'ወላይታቱ', 'regional' => 'wal_ET'],
|
||||
//'chr' => ['name' => 'Cherokee', 'script' => 'Cher', 'native' => 'ᏣᎳᎩ', 'regional' => ''],
|
||||
//'iu' => ['name' => 'Inuktitut (Canadian Aboriginal Syllabics)', 'script' => 'Cans', 'native' => 'ᐃᓄᒃᑎᑐᑦ', 'regional' => 'iu_CA'],
|
||||
//'oj' => ['name' => 'Ojibwa', 'script' => 'Cans', 'native' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ', 'regional' => ''],
|
||||
//'cr' => ['name' => 'Cree', 'script' => 'Cans', 'native' => 'ᓀᐦᐃᔭᐍᐏᐣ', 'regional' => ''],
|
||||
//'km' => ['name' => 'Khmer', 'script' => 'Khmr', 'native' => 'ភាសាខ្មែរ', 'regional' => 'km_KH'],
|
||||
//'mn-Mong' => ['name' => 'Mongolian (Mongolian)', 'script' => 'Mong', 'native' => 'ᠮᠣᠨᠭᠭᠣᠯ ᠬᠡᠯᠡ', 'regional' => 'mn_MN'],
|
||||
//'shi-Tfng' => ['name' => 'Tachelhit (Tifinagh)', 'script' => 'Tfng', 'native' => 'ⵜⴰⵎⴰⵣⵉⵖⵜ', 'regional' => ''],
|
||||
//'tzm' => ['name' => 'Central Atlas Tamazight (Tifinagh)','script' => 'Tfng', 'native' => 'ⵜⴰⵎⴰⵣⵉⵖⵜ', 'regional' => ''],
|
||||
//'yue' => ['name' => 'Yue', 'script' => 'Hant', 'native' => '廣州話', 'regional' => 'yue_HK'],
|
||||
//'ja' => ['name' => 'Japanese', 'script' => 'Jpan', 'native' => '日本語', 'regional' => 'ja_JP'],
|
||||
//'zh' => ['name' => 'Chinese (Simplified)', 'script' => 'Hans', 'native' => '简体中文', 'regional' => 'zh_CN'],
|
||||
//'zh-Hant' => ['name' => 'Chinese (Traditional)', 'script' => 'Hant', 'native' => '繁體中文', 'regional' => 'zh_CN'],
|
||||
//'ii' => ['name' => 'Sichuan Yi', 'script' => 'Yiii', 'native' => 'ꆈꌠꉙ', 'regional' => ''],
|
||||
//'vai' => ['name' => 'Vai (Vai)', 'script' => 'Vaii', 'native' => 'ꕙꔤ', 'regional' => ''],
|
||||
//'jv-Java' => ['name' => 'Javanese (Javanese)', 'script' => 'Java', 'native' => 'ꦧꦱꦗꦮ', 'regional' => ''],
|
||||
//'ko' => ['name' => 'Korean', 'script' => 'Hang', 'native' => '한국어', 'regional' => 'ko_KR'],
|
||||
],
|
||||
|
||||
// Negotiate for the user locale using the Accept-Language header if it's not defined in the URL?
|
||||
// If false, system will take app.php locale attribute
|
||||
'useAcceptLanguageHeader' => true,
|
||||
|
||||
// If LaravelLocalizationRedirectFilter is active and hideDefaultLocaleInURL
|
||||
// is true, the url would not have the default application language
|
||||
//
|
||||
// IMPORTANT - When hideDefaultLocaleInURL is set to true, the unlocalized root is treated as the applications default locale "app.locale".
|
||||
// Because of this language negotiation using the Accept-Language header will NEVER occur when hideDefaultLocaleInURL is true.
|
||||
//
|
||||
'hideDefaultLocaleInURL' => false,
|
||||
|
||||
// If you want to display the locales in particular order in the language selector you should write the order here.
|
||||
//CAUTION: Please consider using the appropriate locale code otherwise it will not work
|
||||
//Example: 'localesOrder' => ['es','en'],
|
||||
'localesOrder' => [],
|
||||
|
||||
// If you want to use custom lang url segments like 'at' instead of 'de-AT', you can use the mapping to tallow the LanguageNegotiator to assign the descired locales based on HTTP Accept Language Header. For example you want ot use 'at', so map HTTP Accept Language Header 'de-AT' to 'at' (['de-AT' => 'at']).
|
||||
'localesMapping' => [],
|
||||
|
||||
// Locale suffix for LC_TIME and LC_MONETARY
|
||||
// Defaults to most common ".UTF-8". Set to blank on Windows systems, change to ".utf8" on CentOS and similar.
|
||||
'utf8suffix' => env('LARAVELLOCALIZATION_UTF8SUFFIX', '.UTF-8'),
|
||||
|
||||
// URLs which should not be processed, e.g. '/nova', '/nova/*', '/nova-api/*' or specific application URLs
|
||||
// Defaults to []
|
||||
'urlsIgnored' => ['/skipped'],
|
||||
|
||||
];
|
156
public/css/langswitch.css
vendored
Normal file
156
public/css/langswitch.css
vendored
Normal file
|
@ -0,0 +1,156 @@
|
|||
@media (min-width:980px) {
|
||||
.top-header .dropdown {
|
||||
position:absolute;
|
||||
right:10%
|
||||
}
|
||||
}
|
||||
@media (min-width:768px) and (max-width:979px) {
|
||||
.top-header .dropdown {
|
||||
position:absolute;
|
||||
/* background-color: azure; */
|
||||
right:10%
|
||||
}
|
||||
}
|
||||
@media (max-width:767px) {
|
||||
.top-header .dropdown {
|
||||
position:absolute;
|
||||
/* background-color:blue; */
|
||||
right:20%
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position:relative;
|
||||
|
||||
/* display: inline-block; */
|
||||
}
|
||||
.dropdown .dropdown-toggle {
|
||||
/* position:relative; */
|
||||
width:40px;
|
||||
float:right;
|
||||
margin-top:24px;
|
||||
margin-left:15px;
|
||||
margin-right:-10px;
|
||||
padding:0 5px;
|
||||
background-color:#f0f0f0;
|
||||
font-size:15px;
|
||||
border-radius:3px;
|
||||
font-weight:600;
|
||||
letter-spacing:1px;
|
||||
z-index:1
|
||||
}
|
||||
.dropdown .dropdown-toggle .caret {
|
||||
display:none
|
||||
}
|
||||
.dropdown .triangle-top-left:before {
|
||||
content:'';
|
||||
position:absolute;
|
||||
width:10px;
|
||||
height:10px;
|
||||
transform:skewX(45deg) scale(1) scaleX(-2) translate(15%,0);
|
||||
border-radius:inherit;
|
||||
background-color:inherit;
|
||||
z-index:-1
|
||||
}
|
||||
|
||||
.dropdown ul.dropdown-menu>li>a {
|
||||
padding:5px;
|
||||
line-height:1;
|
||||
font-weight:600;
|
||||
border-top:1px solid #f0f0f0;
|
||||
border-bottom:none;
|
||||
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
.dropdown ul.dropdown-menu>li>a:active,
|
||||
.dropdown ul.dropdown-menu>li>a:focus,
|
||||
.dropdown ul.dropdown-menu>li>a:hover {
|
||||
background-color:#f0f0f0;
|
||||
border-bottom:none
|
||||
}
|
||||
|
||||
.uppercase{text-transform:uppercase}
|
||||
|
||||
|
||||
|
||||
|
||||
.navbar-header .dropdown ul.dropdown-menu {
|
||||
top: -3px;
|
||||
}
|
||||
.dropdown ul.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 42px;
|
||||
right: -15px !important;
|
||||
width: 50px;
|
||||
left: initial;
|
||||
min-width: initial;
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
/* border-top-color: currentcolor; */
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-color: #f0f0f0;
|
||||
box-shadow: none;
|
||||
}
|
||||
/* .open > .dropdown-menu {
|
||||
display: block;
|
||||
} */
|
||||
|
||||
/* .langswitch-toggle:hover ~ .dropdown-menu, */
|
||||
/* .langswitch-toggle:focus ~ .dropdown-menu {
|
||||
display: block;
|
||||
} */
|
||||
.dropdown:hover .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
float: left;
|
||||
min-width: 160px;
|
||||
padding: 5px 0;
|
||||
margin: 2px 0 0;
|
||||
list-style: none;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid rgba(0,0,0,.15);
|
||||
border-top-width: 1px;
|
||||
border-radius: 0;
|
||||
border-bottom-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
|
||||
box-shadow: 0 6px 12px rgba(0,0,0,.175);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
|
||||
#top-header{
|
||||
background: #f4f6f8 url(../img/theme/bg_top-header.jpg) repeat-x bottom;
|
||||
color: #26517d;
|
||||
height: 33px;
|
||||
font: normal 12px Arial, Helvetica, sans-serif;
|
||||
line-height: 30px;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
body > #top-header{
|
||||
height: auto;
|
||||
min-height: 33px;
|
||||
}
|
||||
|
||||
.wrapper,
|
||||
.messages,
|
||||
#page-footer .wrapper{
|
||||
max-width: 960px;
|
||||
min-width: 800px;
|
||||
padding: 0 20px;
|
||||
margin: auto;
|
||||
}
|
35
resources/views/components/langswitch.blade.php
Normal file
35
resources/views/components/langswitch.blade.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
{{-- <div class="langswitch-wrapper">
|
||||
<a class="dropdown-toggle langswitch-toggle uppercase triangle-top-left selected" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
{{ $currentLocale }} <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
@foreach($localesOrdered as $localeCode => $properties) @if ($localeCode != $currentLocale)
|
||||
<li>
|
||||
<a class="uppercase" rel="alternate" hreflang="{{$localeCode}}" href="{{ $localizedURLs[$localeCode] }}">
|
||||
{{ $localeCode }}
|
||||
</a>
|
||||
</li>
|
||||
@endif @endforeach
|
||||
</ul>
|
||||
</div> --}}
|
||||
|
||||
<div class="langswitch-wrapper dropdown">
|
||||
<a class="dropdown-toggle langswitch-toggle uppercase triangle-top-left selected" data-toggle="dropdown" href="#" role="button"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
{{ $currentLocale }} <span class="caret"></span>
|
||||
</a>
|
||||
<ul id="lang-switch" class="nav dropdown-menu" title="Choose your language">
|
||||
@foreach($localesOrdered as $localeCode => $properties)
|
||||
@if ($localeCode != $currentLocale)
|
||||
|
||||
<li>
|
||||
<a title="documents" href="{{ URL::route('setlocale',['lang' => $localeCode]) }}">{{ $localeCode }}</a>
|
||||
</li>
|
||||
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
<!--<link href="{{ asset('css/app1.css') }}" rel="stylesheet" />-->
|
||||
<!--<link rel='stylesheet' href="{{ asset('css/page.css') }}" />-->
|
||||
<link rel='stylesheet' href="{{ asset('css/styles.css') }}" />
|
||||
<link rel='stylesheet' href="{{ asset('css/langswitch.css') }}" />
|
||||
<!-- Fonts -->
|
||||
<link rel='stylesheet' href="{{ asset('css/font-awesome.css') }}" />
|
||||
<link href="http://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C700italic%2C400%2C300%2C700%2C800&ver=3.8.1" type="text/css" rel="stylesheet">
|
||||
|
@ -118,7 +119,10 @@
|
|||
{{-- <script type="text/javascript" src="{{ asset('js/jquery-2.1.1.min.js') }}"></script> --}}
|
||||
<script type="text/javascript" src="{{ asset('js/lib.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('div.alert').not('alert-important').delay(3000).slideUp(300);
|
||||
$(document).ready(function() {
|
||||
$('div.alert').not('alert-important').delay(3000).slideUp(300);
|
||||
});
|
||||
|
||||
</script>
|
||||
@yield('scripts')
|
||||
|
||||
|
|
|
@ -1,5 +1,31 @@
|
|||
<div class="header" id="menu" itemprop="hasPart" itemscope itemtype="http://schema.org/WPHeader">
|
||||
<div class="container">
|
||||
|
||||
<div class="top-header">
|
||||
|
||||
@include('components.langswitch', [
|
||||
'currentLocale' => App::getLocale(),
|
||||
'localesOrdered' => LaravelLocalization::getLocalesOrder(),
|
||||
'localizedURLs' => getLocalizedURLArray(),
|
||||
])
|
||||
|
||||
{{-- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
|
||||
<i class="fa fa-bars fa-2x"></i>
|
||||
</button> --}}
|
||||
{{-- <a class="navbar-brand no-border hidden-xs first-part" href="{!! URL::to('') !!}">
|
||||
web
|
||||
</a> --}}
|
||||
|
||||
{{-- @include('components.searchbar', [
|
||||
'search' => isSet($search) ? $search : '',
|
||||
]) --}}
|
||||
{{-- <a class="navbar-brand no-border hidden-xs second-part" href="{!! URL::to('') !!}">
|
||||
umenia
|
||||
</a> --}}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="inner-container">
|
||||
|
||||
<div class="pure-hidden-tablet pure-hidden-desktop">
|
||||
|
|
|
@ -16,6 +16,15 @@ use Illuminate\Support\Facades\Route;
|
|||
|
||||
Route::get('/oai', ['as' => 'oai', 'uses' => 'Oai\RequestController@index']);
|
||||
|
||||
//Route::get('/', 'LocalizationController@index');
|
||||
Route::get(
|
||||
'setlocale/{lang}',
|
||||
[
|
||||
'as' => 'setlocale', //name()
|
||||
'uses' => 'Frontend\LocalizationController@setLocale'
|
||||
]
|
||||
);
|
||||
|
||||
//=================================================publish datasets================================================
|
||||
Route::group(
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue
Block a user