*

MB Themes

Re: Cyrillic title and url
« Reply #15 on: March 30, 2021, 08:57:01 AM »
@pipetko
Yes, we've added another set of conversions for URLs as based on SEO guidenance, best way is not to show local characters in URL like cyrilic, greek etc.
But, osclass 4.4 has not been released yet and it's planned maybe in April/May.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

pipetko

  • ****
  • 112 posts
Re: Cyrillic title and url
« Reply #16 on: March 31, 2021, 09:44:40 PM »
@pipetko
Yes, we've added another set of conversions for URLs as based on SEO guidenance, best way is not to show local characters in URL like cyrilic, greek etc.
But, osclass 4.4 has not been released yet and it's planned maybe in April/May.

Exactly but Osclass is doing it by default. The code I gave is for transliteration. Which means it will translate cyrilic letters to latin.

For example user Title for the ad: Продавам краставици, the code will make the url like this: prodavam-krastavitsi. Because without the osclass is putting the signs/letters whatever they are in the url, which means without code usually the urls will be : продавам-краставици, but when publishing somewhere / sharing the url,  looks like %%%#%%%#%%#%%$%%$5  ;D

Code I gave ( BTW It is not my code I sow it in another forum ) wil work for Bulgarian, Russian and few other countries using cyrilic alphabet. But for Greece language, chineese, etc there should be code. I think is a difficult task to do automatic code for each language. The think I would suggest is to have some cynd of plugin for easy way users to make transliteration... Because on each update I have to manually put the code inside the functions.php.

*

MB Themes

Re: Cyrillic title and url
« Reply #17 on: April 01, 2021, 05:51:51 AM »
@pipetko
Yes we took code from someone in forums :)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

pipetko

  • ****
  • 112 posts
Re: Cyrillic title and url
« Reply #18 on: April 06, 2021, 12:18:03 AM »
This code is wrong:
    // 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);



    $string = strtr($string, $chars);

  } else {

I see only greek transliteration, no cyr. I puted my code again
« Last Edit: April 06, 2021, 12:20:17 AM by pipetko »