Jump to content

Error in transliteration


Recommended Posts

Dear Ryan, please correct the transliteration in the page name on the side of back-end.
 
Error that large letters (non-Latin) are simply removed.
 
//Раз Два Три One Two Tri - az-va-ri-one-two-tri
 
Error can be corrected in Sanitizer.php 129 line
public function pageName ($ value, $ beautify = false) {
 
if initially lead all to lowercase using the mb_strtolower
 
$ value = mb_strtolower ($ value);
 
//Раз Два Три One Two Tri - raz-dva-tri-one-two-tri
 
 
and  InputfieldPageName.module
    
        'ю' => 'iu',  
        'я' => 'ia',
 
in countries where the use of the Cyrillic alphabet.
by using the Latin alphabet transliteration written through Y

        'ю' => 'yu',  

        'я' => 'ya',

And so, very often Ю, written as Y

Link to comment
Share on other sites

This not error but feature. You can configure the conversion yourself in the page name module in admin.

 
Error that capital letters of the Latin alphabet are not cut as:
1. Cyrillic capital letters not in the list of replacement.
2. $ v = iconv ("UTF-8", "ASCII / / TRANSLIT / / IGNORE", $ value); hates Cyrillic //before Рaz Дva Тri after ?az ?va ?ri
3. just strtolower, does not translate to lower case letters Cyrillic alphabet for multilingual mb_strtolower need to use since it is based on the Unicode
 
This is a mistake, and it is treated in two ways.
1. Expanding the list of replacements.
or
2. Initially bringing value to lowercase function through mb_strtolower

I note that on the client side so there is no error, as well js translate uppercase to lower

I think it was a mistake, because the realization of the transliteration into front-end and back-end are different, the best realization on front-end side

more

Ы = i, as sibling И

real example creat page from fron-end //STOCKS in Cyrilic "АКЦИИ", field name autofill translate akcii, batch create via api void error as name ''

rules transliteration in russia via GOST 7.79-2000(b) as it ISO 9

Транслитерация ГОСТ 7.79-2000 (Б)
 
а = a
б = b
в = v
г = g
д = d
е = e
ё = yo
ж = zh
з = z
и = i
й = j
к = k
л = l
м  = m
н = n
о = o
п = p
р = r
с = s
т = t
у = u
ф = f
х = kh
ц = cz,c
ч = ch
ш = sh
щ = shh
ъ = ''
ы = y'
ь = '
э = e'
ю = yu
я = ya
 
Link to comment
Share on other sites

I'm not sure I understand everything, but looks like what is specified in the Page Name module settings is working for backend page creation and API creation. Versal letters are converted correct.

Entering "Рaz Дva Тri" converts to "raz-dva-tri"

post-100-0-59188100-1388959124_thumb.png

$p = new Page();
$p->template = "basic-page";
$p->parent = 1;
$title = "АКЦИИ";
$p->title = $title;
$p->name = $sanitizer->pageName($title, Sanitizer::translate);
$p->save();

The page is created with name "aktcii"

As said you can add missing/new chars to the module settings in admin yourself. I'm not sure you're suggesting to add more to the standard or what.

I think whatever languages you're supporting, there's chances that there is an overlap that would make things complicated or impossible. For example in finish there's ö => o, but in german it's ö=oe. So I also have to change the setting for every new site I'm doing, but that's how it is. 

Also note that things like ц = cz,c or ы = y' is not possible cause the page name only allows ascii chars.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...