Use Google Fonts subsets for localizations
This commit is contained in:
@@ -50,5 +50,7 @@ class AppComposer
|
|||||||
} else {
|
} else {
|
||||||
$view->withSiteTitle(Config::get('setting.app_name'));
|
$view->withSiteTitle(Config::get('setting.app_name'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$view->withFontSubset(Config::get('langs.'.Config::get('app.locale').'.subset', 'latin'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
170
config/langs.php
170
config/langs.php
@@ -11,38 +11,140 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
// Enabled langs
|
// Enabled langs
|
||||||
'af' => 'Afrikaans',
|
'af' => [
|
||||||
'ar' => 'Arabic',
|
'name' => 'Afrikaans',
|
||||||
'ca' => 'Catalan',
|
'subset' => 'latin',
|
||||||
'cs' => 'Czech',
|
],
|
||||||
'da' => 'Danish',
|
'ar' => [
|
||||||
'de' => 'Deutsch',
|
'name' => 'Arabic',
|
||||||
'el' => 'Greek',
|
'subset' => 'latin',
|
||||||
'en' => 'English',
|
],
|
||||||
'en-UD' => 'CrowdIn - InContext Localization',
|
'ca' => [
|
||||||
'es' => 'Español',
|
'name' => 'Catalan',
|
||||||
'fa' => 'Persian',
|
'subset' => 'latin',
|
||||||
'fi' => 'Finnish',
|
],
|
||||||
'fr' => 'Français',
|
'cs' => [
|
||||||
'he' => 'Hebrew',
|
'name' => 'Czech',
|
||||||
'hu' => 'Hungarian',
|
'subset' => 'latin,latin-ext',
|
||||||
'id' => 'Indonesian',
|
],
|
||||||
'it' => 'Italiano',
|
'da' => [
|
||||||
'ja' => 'Japanese',
|
'name' => 'Danish',
|
||||||
'ko' => '한글',
|
'subset' => 'latin,latin-ext',
|
||||||
'nl' => 'Nederlands',
|
],
|
||||||
'no' => 'Norwegian',
|
'de' => [
|
||||||
'pl' => 'Polski',
|
'name' => 'Deutsch',
|
||||||
'pt-BR' => 'Portuguese',
|
'subset' => 'latin,latin-ext',
|
||||||
'pt-PT' => 'Portuguese, Brazilian',
|
],
|
||||||
'ro' => 'Romanian',
|
'el' => [
|
||||||
'ru' => 'Русский',
|
'name' => 'Greek',
|
||||||
'sq' => 'Albanian',
|
'subset' => 'greek,greek-ext',
|
||||||
'sr' => 'Sebrian (Cyrillic)',
|
],
|
||||||
'sv-SE' => 'Swedish',
|
'en' => [
|
||||||
'tr' => 'Turkish',
|
'name' => 'English',
|
||||||
'uk' => 'Ukranian',
|
'subset' => 'latin',
|
||||||
'vi' => 'Vietnamese',
|
],
|
||||||
'zh-CN' => '简体中文',
|
'en-UD' => [
|
||||||
'zh-TW' => '繁體中文',
|
'name' => 'CrowdIn - InContext Localization',
|
||||||
|
'subset' => 'latin',
|
||||||
|
],
|
||||||
|
'es' => [
|
||||||
|
'name' => 'Español',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'fa' => [
|
||||||
|
'name' => 'Persian',
|
||||||
|
'subset' => 'latin',
|
||||||
|
],
|
||||||
|
'fi' => [
|
||||||
|
'name' => 'Finnish',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'fr' => [
|
||||||
|
'name' => 'Français',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'he' => [
|
||||||
|
'name' => 'Hebrew',
|
||||||
|
'subset' => 'latin',
|
||||||
|
],
|
||||||
|
'hu' => [
|
||||||
|
'name' => 'Hungarian',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'id' => [
|
||||||
|
'name' => 'Indonesian',
|
||||||
|
'subset' => 'latin',
|
||||||
|
],
|
||||||
|
'it' => [
|
||||||
|
'name' => 'Italiano',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'ja' => [
|
||||||
|
'name' => 'Japanese',
|
||||||
|
'subset' => 'latin',
|
||||||
|
],
|
||||||
|
'ko' => [
|
||||||
|
'name' => '한글',
|
||||||
|
'subset' => 'latin',
|
||||||
|
],
|
||||||
|
'nl' => [
|
||||||
|
'name' => 'Nederlands',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'no' => [
|
||||||
|
'name' => 'Norwegian',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'pl' => [
|
||||||
|
'name' => 'Polski',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'pt-BR' => [
|
||||||
|
'name' => 'Portuguese',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'pt-PT' => [
|
||||||
|
'name' => 'Portuguese, Brazilian',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'ro' => [
|
||||||
|
'name' => 'Romanian',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'ru' => [
|
||||||
|
'name' => 'Русский',
|
||||||
|
'subset' => 'latin,cyrillic',
|
||||||
|
],
|
||||||
|
'sq' => [
|
||||||
|
'name' => 'Albanian',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'sr' => [
|
||||||
|
'name' => 'Sebrian (Cyrillic)',
|
||||||
|
'subset' => 'latin,cyrillic,cyrillic-ext',
|
||||||
|
],
|
||||||
|
'sv-SE' => [
|
||||||
|
'name' => 'Swedish',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'tr' => [
|
||||||
|
'name' => 'Turkish',
|
||||||
|
'subset' => 'latin,latin-ext',
|
||||||
|
],
|
||||||
|
'uk' => [
|
||||||
|
'name' => 'Ukranian',
|
||||||
|
'subset' => 'latin,cyrillic-ext',
|
||||||
|
],
|
||||||
|
'vi' => [
|
||||||
|
'name' => 'Vietnamese',
|
||||||
|
'subset' => 'latin,vietnamese',
|
||||||
|
],
|
||||||
|
'zh-CN' => [
|
||||||
|
'name' => '简体中文',
|
||||||
|
'subset' => 'latin',
|
||||||
|
],
|
||||||
|
'zh-TW' => [
|
||||||
|
'name' => '繁體中文',
|
||||||
|
'subset' => 'latin',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<title>{{ $page_title or $site_title }}</title>
|
<title>{{ $page_title or $site_title }}</title>
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset={{ $font_subset }}" rel="stylesheet" type="text/css">
|
||||||
<link rel="stylesheet" href="{{ elixir('dist/css/all.css') }}">
|
<link rel="stylesheet" href="{{ elixir('dist/css/all.css') }}">
|
||||||
@yield('css')
|
@yield('css')
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
<title>{{ $site_title }}</title>
|
<title>{{ $site_title }}</title>
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset={{ $font_subset }}" rel="stylesheet" type="text/css">
|
||||||
<link rel="stylesheet" href="{{ elixir('dist/css/all.css') }}">
|
<link rel="stylesheet" href="{{ elixir('dist/css/all.css') }}">
|
||||||
|
|
||||||
@include('partials.stylesheet')
|
@include('partials.stylesheet')
|
||||||
|
|||||||
@@ -102,9 +102,9 @@
|
|||||||
<label>{{ trans('forms.setup.site_locale') }}</label>
|
<label>{{ trans('forms.setup.site_locale') }}</label>
|
||||||
<select name="settings[app_locale]" class="form-control" required>
|
<select name="settings[app_locale]" class="form-control" required>
|
||||||
<option value="">Select Language</option>
|
<option value="">Select Language</option>
|
||||||
@foreach($langs as $lang => $name)
|
@foreach($langs as $key => $lang)
|
||||||
<option value="{{ $lang }}" @if(Binput::old('settings.app_locale') == $lang || $user_language == $lang) selected @endif>
|
<option value="{{ $key }}" @if(Binput::old('settings.app_locale') == $key || $user_language == $key) selected @endif>
|
||||||
{{ $name }}
|
{{ $lang['name'] }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user