Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by olegA-5 1 year, 6 months ago.

Assisted by: Bigul.

Author Posts
June 5, 2023 at 3:35 pm #13772885

olegA-5

Hello,

I have a page on an LTR language containing, say, the following:
Article 1.

I want to translate it into some RTL language, let’s say Arabic.

As I understand, it should look like this (in the escaped form): ‏%D8%A7%D9%84%D9%85%D8%A7%D8%AF%D8%A9-1#
Even if I manage (with the help of r-ctrl + l-shift) the translation to look exactly like this in the ATE opened in Chrome browser,
- first, it looks like this at the frontend: D8%A7%D9%84%D9%85%D8%A7%D8%AF%D8%A9-4#%E2%80%8F%,
- second, the whole slug becames escaped (I don't have it with any of the LTL languages), so it looks like this
ar/%d9%85%d8%b3%d8%aa%d9%86%d8%af%d8%a7%d8%aa/%d9%85%d8%ac%d9%84%d8%b3-%d8%a3%d9%88%d8%b1%d9%88%d8%a8%d8%a7/%d8%a7%d9%84%d8%a7%d8%aa%d9%81%d8%a7%d9%82%d9%8a%d8%a9-%d8%a7%d9%84%d8%a3%d9%88%d8%b1%d9%88%d8%a8%d9%8a%d8%a9-%d9%84%d8%ad%d9%82%d9%88%d9%82-%d8%a7%d9%84%d8%a5%d9%86%d8%b3%d8%a7%d9%86/D8%A7%D9%84%D9%85%D8%A7%D8%AF%D8%A9-1#%E2%80%8F%
Instead of ar/مستندات/مجلس-أوروبا/الاتفاقية-الأوروبية-لحقوق-الإنسان/#1-المادة,
- third, the hash is in the place where it should be in the case of LTR (at the right end of the slug), but not where it should be in the case of RTL.

So, my question: is there a change to make it all work, i.e. to have at the end (as a result) the ar/مستندات/مجلس-أوروبا/الاتفاقية-الأوروبية-لحقوق-الإنسان/#1-المادة in place where there is Article 1?

June 6, 2023 at 8:56 am #13776545

olegA-5

I found out the way to make it in the ATA (Chrome browser with LTR) by (1) encoding all numbers (Eg. %31 instead of 1), (2) encoding all letters, (3) putting all % in all encoded symbols not on the left but on the right of the other characters (Eg. D8%A7% instead of %D8%A7 for Arabian letter 'ا') and (4) by moving the % of the symbol next to the dash (that % which is the closest one to the dash in case of more than one %) to the other side of dash (so, the dash stands in fact within the closest set of characters encoding the letter, Eg. D8%A9-%31% for 'ا dash 1' (without spaces, I can't write it here because browser changes it to '1-ا'), here we have D8%A9% instead of %D8%A9 for 'ا' , dash which is moved inside of that combination of symbols for 'ا', just before the last (closest to it) %, finally, escaped 1, i.e. %31, but also 'reversed' that gives us 31%. After browser (ATE or something else) reverse everything the way it believes it should be reversed (to make numbers to be written LRT within a RTL language, like the Arabic, because that is the specific of the numbers in Arabic) it becomes the needed string. This is for escaped (!) المادة-1, that I needed even more than المادة dash 1 (without spaces and with '-' instead of dash) from my original question.