Adds support for spanish substitutions.

This commit is contained in:
Patrick D'appollonio 2014-06-12 00:10:54 -04:00 committed by Dobrosław Żybort
parent 9e21c95a06
commit 994cac2e4a
2 changed files with 7 additions and 0 deletions

View File

@ -19,3 +19,8 @@ var plSub = map[rune]string{
'&': "i",
'@': "na",
}
var esSub = map[rune]string{
'&': "i",
'@': "na",
}

View File

@ -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)
}