diff --git a/languages_substitution.go b/languages_substitution.go index f7ab294..00541e2 100644 --- a/languages_substitution.go +++ b/languages_substitution.go @@ -17,6 +17,7 @@ func init() { &fiSub, &frSub, &grSub, + &idSub, &kkSub, &nbSub, &nlSub, @@ -95,6 +96,10 @@ var grSub = map[rune]string{ 'ϋ': "u", } +var idSub = map[rune]string{ + '&': "dan", +} + var kkSub = map[rune]string{ '&': "jane", 'ә': "a", diff --git a/slug.go b/slug.go index 2917bbf..11a20f4 100644 --- a/slug.go +++ b/slug.go @@ -71,6 +71,8 @@ func MakeLang(s string, lang string) (slug string) { slug = SubstituteRune(slug, frSub) case "gr", "el", "ell": slug = SubstituteRune(slug, grSub) + case "id", "idn", "ind": + slug = SubstituteRune(slug, idSub) case "kz", "kk", "kaz": slug = SubstituteRune(slug, kkSub) case "nb", "nob": diff --git a/slug_test.go b/slug_test.go index 9376c7c..08a6bc8 100644 --- a/slug_test.go +++ b/slug_test.go @@ -107,6 +107,7 @@ func TestSlugMakeLang(t *testing.T) { {"fr", "This & that", "this-et-that", true}, {"fr", "This @ that", "this-arobase-that", true}, {"gr", "This & that", "this-kai-that", true}, + {"id", "This & that", "this-dan-that", true}, {"ell", "This & that", "this-kai-that", true}, {"Ell", "This & that", "this-kai-that", true}, {"kk", "This & that", "this-jane-that", true},