Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Include the slug transliteration plugin into the core of GS
#18
mvlcek Wrote: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.
(Emphasis mine.)

Spitting is exactly the problem, take the following example:
Code:
...
'TRANSLITERATION' => array('æ'=>'ae','ꝛ'=>'r','ß'=>'ss'),
'TRANSLIT_FROM' => 'æꝛß',
'TRANSLIT_TO' => 'aerss',
...
The array works and will transliterate æ to ae and ß to ss. The strings will not work, they will turn æ into a (swapping the first characters) and ß into r (swapping the third characters). There is no way to teach a string splitter when 2 characters might go together.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!


Messages In This Thread
Include the slug transliteration plugin into the core of GS - by Zegnåt - 2011-06-15, 03:58:03



Users browsing this thread: 1 Guest(s)