I have created a multilingual website in Korean and English. (Kirby3)
Can users detect their country and automatically navigate to their native language page?
(Especially for Koreans, I want them to go to the Korean page. All other countries can be displayed in English.)
site/config/config.php
return [
'languages' => true,
'date.handler' => 'strftime',
'languages.detect' => true,
'debug' => true,
'panel' =>[
'install' => true
]
];
site/languages/en.php
return [ 'code' => 'en', 'default' => true, 'direction' => 'ltr', 'locale' => 'en_US', 'name' => 'English', 'url' => '/', 'locale' => [ LC_ALL => 'en_US.utf8', LC_COLLATE => 'en_US.utf8', LC_MONETARY => 'en_US.utf8', LC_NUMERIC => 'en_US.utf8', LC_TIME => 'en_US.utf8', LC_MESSAGES => 'en_US.utf8', LC_CTYPE => 'en_US.utf8' ] ];
site/languages/ko.php
return [ 'code' => 'ko', 'default' => false, 'direction' => 'ltr', 'locale' => 'ko_KR', 'name' => 'Korean', 'url' => '/kr', 'locale' => [ LC_ALL => 'ko_KR.utf8', LC_COLLATE => 'ko_KR.utf8', LC_MONETARY => 'ko_KR.utf8', LC_NUMERIC => 'ko_KR.utf8', LC_TIME => 'ko_KR.utf8', LC_MESSAGES => 'ko_KR.utf8', LC_CTYPE => 'ko_KR.utf8' ] ];