Adds support for spanish substitutions.
This commit is contained in:
parent
9e21c95a06
commit
994cac2e4a
@ -19,3 +19,8 @@ var plSub = map[rune]string{
|
|||||||
'&': "i",
|
'&': "i",
|
||||||
'@': "na",
|
'@': "na",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var esSub = map[rune]string{
|
||||||
|
'&': "i",
|
||||||
|
'@': "na",
|
||||||
|
}
|
||||||
|
2
slug.go
2
slug.go
@ -51,6 +51,8 @@ func MakeLang(s string, lang string) (slug string) {
|
|||||||
slug = SubstituteRune(slug, enSub)
|
slug = SubstituteRune(slug, enSub)
|
||||||
case "pl":
|
case "pl":
|
||||||
slug = SubstituteRune(slug, plSub)
|
slug = SubstituteRune(slug, plSub)
|
||||||
|
case "es":
|
||||||
|
slug = SubstituteRune(slug, esSub)
|
||||||
default: // fallback to "en" if lang not found
|
default: // fallback to "en" if lang not found
|
||||||
slug = SubstituteRune(slug, enSub)
|
slug = SubstituteRune(slug, enSub)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user