mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 09:26:29 -06:00
Merge pull request #3638 from sephrat/windows-locale
UTF8 locale support for Windows
This commit is contained in:
commit
71ce9eb004
@ -614,6 +614,11 @@ class Steam
|
||||
if ('equal' === $locale) {
|
||||
return $this->getLanguage();
|
||||
}
|
||||
|
||||
// Check for Windows to replace the locale correctly.
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$locale = str_replace('_', '-', $locale);
|
||||
}
|
||||
|
||||
return $locale;
|
||||
}
|
||||
@ -627,7 +632,6 @@ class Steam
|
||||
return [
|
||||
sprintf('%s.utf8', $locale),
|
||||
sprintf('%s.UTF-8', $locale),
|
||||
str_replace('_', '-', $locale), // for Windows.
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,6 @@ return [
|
||||
'pref_locale' => 'Locale settings',
|
||||
'pref_languages_help' => 'Firefly III supports several languages. Which one do you prefer?',
|
||||
'pref_locale_help' => 'Firefly III allows you to set other local settings, like how currencies, numbers and dates are formatted. Entries in this list may not be supported by your system. Firefly III doesn\'t have the correct date settings for every locale; contact me for improvements.',
|
||||
'pref_locale_no_windows' => 'This feature may not work on Windows.',
|
||||
'pref_locale_no_demo' => 'This feature won\'t work for the demo user.',
|
||||
'pref_custom_fiscal_year' => 'Fiscal year settings',
|
||||
'pref_custom_fiscal_year_label' => 'Enabled',
|
||||
|
@ -72,7 +72,6 @@
|
||||
<ul class="text-warning">
|
||||
|
||||
{% if IS_DEMO_SITE %}<li class="text-danger">{{ 'pref_locale_no_demo'|_ }}</li>{% endif %}
|
||||
<li>{{ 'pref_locale_no_windows'|_ }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
|
Loading…
Reference in New Issue
Block a user