2011-06-15, 03:47:52
Zegnåt Wrote:yojoe Wrote:mvlcek Wrote:include two strings TRANSLIT_FROM and TRANSLIT_TO in the language files and don't need to define an extra array.It also disables some languages from using the transliteration function. Japanese, Korean, Chinese, et al. come to mind. These languages need multiple Latin characters per symbol, which is impossible when you are just matching 2 strings.
This makes customization much easier and uses the standard i18n features of GetSimple:
Code:...
'TRANSLIT_FROM' => 'äöüÄÖÜ',
'TRANSLIT_TO' => 'aouAOU',
...
These strings would be UTF-8, thus all languages are supported. The transliteration function would need to split the string with mb_substr (or similar) to create the arrays needed for strtr (or whatever). As this splitting is only done when saving pages, there is no performance hit.