glugify/locale
Types
Locales for language-specific transliteration rules.
The default transliteration maps each character to its closest single
ASCII letter (ä -> a). Some languages have their own romanization
conventions, which a locale enables:
German:ä->ae,ö->oe,ü->ueDanish/Norwegian:æ->ae,ø->oe,å->aaSwedishandTurkish: same as the default mapping; provided so the intent can be stated explicitly in code
Examples
import glugify/config
import glugify/locale
config.default()
|> config.with_locale(locale.German)
// "Über München" -> "ueber-muenchen"
pub type Locale {
Default
German
Danish
Norwegian
Swedish
Turkish
}
Constructors
-
Default -
German -
Danish -
Norwegian -
Swedish -
Turkish