diff --git a/languages_substitution.go b/languages_substitution.go index 54a044d..60d3c6c 100644 --- a/languages_substitution.go +++ b/languages_substitution.go @@ -20,6 +20,7 @@ func init() { &grSub, &huSub, &idSub, + &itSub, &kkSub, &nbSub, &nlSub, @@ -123,6 +124,11 @@ var idSub = map[rune]string{ '&': "dan", } +var itSub = map[rune]string{ + '&': "e", + '@': "chiocciola", +} + var kkSub = map[rune]string{ '&': "jane", 'ә': "a", diff --git a/slug.go b/slug.go index 98192f1..1439ebc 100644 --- a/slug.go +++ b/slug.go @@ -77,6 +77,8 @@ func MakeLang(s string, lang string) (slug string) { slug = SubstituteRune(slug, huSub) case "id", "idn", "ind": slug = SubstituteRune(slug, idSub) + case "it", "ita": + slug = SubstituteRune(slug, itSub) case "kz", "kk", "kaz": slug = SubstituteRune(slug, kkSub) case "nb", "nob": diff --git a/slug_test.go b/slug_test.go index 0505da1..7cff10a 100644 --- a/slug_test.go +++ b/slug_test.go @@ -115,6 +115,8 @@ func TestSlugMakeLang(t *testing.T) { {"fr", "This @ that", "this-arobase-that", true}, {"gr", "This & that", "this-kai-that", true}, {"id", "This & that", "this-dan-that", true}, + {"it", "This & that", "this-e-that", true}, + {"it", "This @ that", "this-chiocciola-that", true}, {"ell", "This & that", "this-kai-that", true}, {"Ell", "This & that", "this-kai-that", true}, {"kk", "This & that", "this-jane-that", true},