Skip to content

Language detects doesn't working correctly with custom locale #5320

@afbora

Description

@afbora

Description

Language detects doesn't working correctly with custom locale. Here my setup:

// accepted languages
// tr,en-US;q=0.9,en;q=0.8,ar;q=0.7,fr;q=0.6,hu;q=0.5,pl;q=0.4,de;q=0.3,ru;q=0.2,es;q=0.1

// /site/config/config.php
return [
    'languages' => true,
    'languages.detect' => true
];

// /site/languages/tr.php
return [
    'code' => 'tr',
    'default' => false,
    'direction' => 'ltr',
    'locale' => [
        'LC_ALL' => 'tr_TR.utf-8',
        'LC_COLLATE' => 'tr_TR.utf-8',
        'LC_MONETARY' => 'tr_TR.utf-8',
        'LC_NUMERIC' => 'tr_TR.utf-8',
        'LC_TIME' => 'tr_TR.utf-8',
        'LC_CTYPE' => 'en_US.utf-8'
    ],
    'name' => 'TR',
    'translations' => [],
    'url' => NULL
];

Works great if I set 'LC_ALL' => 'tr' instead tr_TR.utf-8 or tr_TR.

Your setup

Kirby Version
3.9.5

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions