Skip to content

Commit 729fb78

Browse files
committed
minor #17885 [String] Minor tweak about the slugger and locales (javiereguiluz)
This PR was merged into the 5.4 branch. Discussion ---------- [String] Minor tweak about the slugger and locales Commits ------- b1aff37 [String] Minor tweak about the slugger and locales
2 parents 4080e85 + b1aff37 commit 729fb78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/string.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,11 @@ The slugger transliterates the original string into the Latin script before
530530
applying the other transformations. The locale of the original string is
531531
detected automatically, but you can define it explicitly::
532532

533-
// this tells the slugger to transliterate from Korean language
533+
// this tells the slugger to transliterate from Korean ('ko') language
534534
$slugger = new AsciiSlugger('ko');
535535

536536
// you can override the locale as the third optional parameter of slug()
537+
// e.g. this slugger transliterates from Persian ('fa') language
537538
$slug = $slugger->slug('...', '-', 'fa');
538539

539540
In a Symfony application, you don't need to create the slugger yourself. Thanks

0 commit comments

Comments
 (0)