Cyrilic to Latin
« on: February 16, 2021, 02:56:13 PM »
\oc-includes\osclass\formatting.php at line 187

This is actually Greek and not Cyrillic.

Code: [Select]
   // update 420, cyrilic to latin
    $cyr = array('α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','п','ρ','σ','τ','υ','φ','χ','ψ','ω','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','ί','ό','ώ','ά','ή','έ','€');
    $lat = array('a','b','g','d','e','z','i','th','i','k','l','m','n','x','o','p','r','s','t','y','f' ,'x' ,'ps' ,'w','A','B','G','D','E','Z','I','TH','I','K','L','M','N','X','O','P','R','S','T','Y','F' ,'X' ,'Ps' ,'W' ,'i' ,'ο' ,'w', 'a', 'h', 'e', 'euro');
    $string = str_replace($cyr, $lat, $string);

I have changed the array to suit my needs. After this fix, all the Cyrillic slugs/urls for ads, categories and pages are displayed in latin.

Code: [Select]
    // update 420, cyrilic to latin
    $cyr = array('а','б','в','г','д','ѓ','е','ж','з','ѕ','и','ј','к','л','љ','м','н','њ','о','п','р','с','т','ќ','у','ф','х','ц','ч','џ','ш','А','Б','В','Г','Д','Ѓ','Е','Ж','З','Ѕ','И','Ј','К','Л','Љ','М','Н','Њ','О','П','Р','С','Т','Ќ','У','Ф','Х','Ц','Ч','Џ','Ш','€');
    $lat = array('a','b','v','g','d','gj','e','zh','z','dz','i','j','k','l','lj','m','n','nj','o','p','r','s','t','kj','u','f','h','c','ch','dz','sh','A','B','V','G','D','GJ','E','ZH','Z','DZ','I','J','K','L' ,'LJ' ,'M' ,'N' ,'NJ' ,'O' ,'P', 'R', 'S', 'T','KJ','U','F','H','C','CH','DZ','SH','EUR');
    $string = str_replace($cyr, $lat, $string);

In the array I have not included all Cyrillic letters, only Macedonian (Serbian, Bulgarian, Russian etc. are missing). Perhaps some other users can fill in the holes and this can be included in the next version?



MB Themes

Re: Cyrilic to Latin
« Reply #1 on: February 24, 2021, 09:08:53 AM »
@Petar Petkovski
Thank you for feedback, will be part of 4.4 osclass upgrade
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots