From b1aff37cbed5e1c1af1496d8743a8ea37f309cf9 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Feb 2023 11:57:54 +0100 Subject: [PATCH] [String] Minor tweak about the slugger and locales --- components/string.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/string.rst b/components/string.rst index 17edd37d802..e4c4d9f0c8b 100644 --- a/components/string.rst +++ b/components/string.rst @@ -530,10 +530,11 @@ The slugger transliterates the original string into the Latin script before applying the other transformations. The locale of the original string is detected automatically, but you can define it explicitly:: - // this tells the slugger to transliterate from Korean language + // this tells the slugger to transliterate from Korean ('ko') language $slugger = new AsciiSlugger('ko'); // you can override the locale as the third optional parameter of slug() + // e.g. this slugger transliterates from Persian ('fa') language $slug = $slugger->slug('...', '-', 'fa'); In a Symfony application, you don't need to create the slugger yourself. Thanks