diff --git a/languages_substitution.go b/languages_substitution.go index 8671643..95b7456 100644 --- a/languages_substitution.go +++ b/languages_substitution.go @@ -19,3 +19,8 @@ var plSub = map[rune]string{ '&': "i", '@': "na", } + +var esSub = map[rune]string{ + '&': "i", + '@': "na", +} diff --git a/slug.go b/slug.go index 1c01685..4f9c3e3 100644 --- a/slug.go +++ b/slug.go @@ -51,6 +51,8 @@ func MakeLang(s string, lang string) (slug string) { slug = SubstituteRune(slug, enSub) case "pl": slug = SubstituteRune(slug, plSub) + case "es": + slug = SubstituteRune(slug, esSub) default: // fallback to "en" if lang not found slug = SubstituteRune(slug, enSub) }