diff --git a/languages_substitution.go b/languages_substitution.go index ad0963f..ff4122d 100644 --- a/languages_substitution.go +++ b/languages_substitution.go @@ -19,6 +19,7 @@ func init() { &grSub, &huSub, &idSub, + &itSub, &kkSub, &nbSub, &nlSub, @@ -122,6 +123,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 14acce7..2a9d7f7 100644 --- a/slug.go +++ b/slug.go @@ -75,6 +75,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 baace64..42aec2c 100644 --- a/slug_test.go +++ b/slug_test.go @@ -111,6 +111,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},