Skip to content

Instantly share code, notes, and snippets.

@opengeek
Created September 20, 2012 13:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opengeek/3755891 to your computer and use it in GitHub Desktop.
Save opengeek/3755891 to your computer and use it in GitHub Desktop.
Example of using the MODX transliteration service
<?php
$translitClassPath = $this->xpdo->getOption(
'friendly_alias_translit_class_path',
$options,
$this->xpdo->getOption('core_path', $options, MODX_CORE_PATH) . 'components/'
);
if ($this->xpdo->getService('translit', $translitClass, $translitClassPath, $options)) {
$alias = $this->xpdo->translit->translate($stringToApplyTransliterationTo, $translitTableName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment