Osclass
Osclass copied to clipboard
osc_item_url_from_item and locales
osc_item_url_from_item
behaves weird with locales.
It uses the second argument, $locale
and prepends it to the URL.
Why not use it to get the item title in the proper locale?
Replace osc_sanitizeString(str_replace(',', '-', $item['s_title'])),
with osc_sanitizeString(str_replace(',', '-', osc_item_title($locale)))
.
There's no need for the locale code in the URL at all imho.