How to upload filename written in korean?

i want to upload filename written in korean via panel but panel doesn’t perceive it as any letter. i tried to use this language reference ( Multi-language | Kirby CMS ) but doesn’t work properly.

Hi,

This was not an easy task, and in the end I needed AI to give you a correct answer also because I ran into a bug as I tested my hook.

The Panel strips Korean characters on upload because file names go through F::safeName() → Str::slug(), which transliterates to Latin/ASCII. Korean/Hangul has no transliteration mapping, so the characters are simply removed rather than converted — you end up with an empty or broken name.

There’s no config option to disable this for Panel uploads (slugs config only remaps individual Latin characters, it doesn’t stop stripping of unmapped scripts). The usual workaround is a file.create:after hook that renames the file afterward with the original name preserved somehow (e.g. base64/timestamp + original in metadata), since changeName() won’t work in a :before hook (files are immutable at that point):

'hooks' => [
'file.create:after' => function (Kirby\Cms\File $file) {
return $file->changeName('your-desired-name');
}
]

Note the return — without it the rename can silently not stick in current versions. Also be aware there’s an open bug in 5.3.x where changeName() can leave an orphaned UUID stub at the old sidecar path, which may confuse the Panel — worth checking your content folder after testing.

Best

I think we do have the mapping here: kirby/i18n/rules/ko.json at main · getkirby/kirby · GitHub

So rather have to look into why these aren’t effectively used. @jin-kwang could you give us a little more context: when uploading the files with Korean file names, what’s the Panel UI language of the Panel user? And which content translation language is active (if any)?

Then you have to activate it through

'slugs' => 'ko'

Is there an automatic loading process in Kirby? I don’t think so, because that would mean Kirby has to load over two dozen translation files on every request.

Even if we load all languages, there is no way to apply all language rules to filenames as different languages will have contradicting rules how to replace certain characters. That’s why I am curious about the context these are uploaded, if from that one could deprive the expectation to use the Korean rules.