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.

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 5 months ago.

Assisted by: Long Nguyen.

Author Posts
June 8, 2023 at 3:09 pm #13794201
olegA-5

I have a page with the following part as I see it in the classic editor:

[su_spoiler title="1" anchor="%D1%81%D1%82%D0%B0%D1%82%D1%8C%D1%8F-1"]
<p>Согласно статье 22...</p>[/su_spoiler]

When published, it looks like this:

<div class="su-spoiler" data-anchor="%D1%81%D1%82%D0%B0%D1%82%D1%8C%D1%8F-1"><div class="su-spoiler-title">1</div><div class="su-spoiler-content">
<p>Согласно статье 22...</p></div></div>

In the ATE I don't see "#%D1%81%D1%82%D0%B0%D1%82%D1%8C%D1%8F-22" as requiring translation. If I manually enter it, it would have the following 'description': su_spoiler: content html-attr.

What rule should I add to wpml-config to have "#%D1%81%D1%82%D0%B0%D1%82%D1%8C%D1%8F-22", i.e. href of the content part of the su_spoiler tag, to be registered for _mandatory_ translation? (Certainly, it is urlencoded. And this is a link. However, since I want it to be translated in full, I don't want WPML to treat it like a link, i.e. doing with it anything else except translating.)

I also have the following part (classic editor):

<table id="myTable">
<thead>
<tr>
<th>Страна</th>
<th>Подписание</th>
</tr>
</thead>
<tbody>
<tr>
<td>Албания</td>
<td>13.07.1995</td>
</tr>
</tbody>
</table>

In the ATE I don't see "13.07.1995" as requiring translation because it's treated as numbers with some punctuation not to be translated. What rule should I add to wpml-config to have "13.07.1995", i.e. _all_ numbers within table with id="myTable", to be registered for mandatory translation?

Thank you!

New threads created by Long Nguyen and linked to this one are listed below:

https://wpml.org/forums/topic/split-wpml-config-rule-for-href-within-content-of-a-shortcodes-tag-and-for-numbers/

June 9, 2023 at 7:37 am #13797325

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Oleg,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

We can handle one issue per ticket only so I will split this ticket into a new one for your second issue.

To register a shortcode for translation, please follow the documentation https://wpml.org/documentation/translating-your-contents/page-builders/how-to-register-page-builder-modules-and-theme-options/

For example:

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>su_spoiler</tag>
      <attributes>
        <attribute>anchor</attribute>
      </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

In ATE, if you want to translate the URL (href), please search for the relevant keywords, please check this screenshot hidden link

Look forward to your reply.
Thanks

June 9, 2023 at 8:21 am #13797549

olegA-5

Hello,
Thank you for the response.
The documentation you mentioned couldn't help me being far from exhausting.
I have already the rule you proposed. A have a more specific variant, since I have urlencoded anchors: <attribute encoding="urlencode">anchor</attribute>.
It doesn't do what I need. It registers for mandatory translation the values of the anchor tag (as the "%D1%81%D1%82%D0%B0%D1%82%D1%8C%D1%8F-1" from my example). However it doesn't register the href (as the "#%D1%81%D1%82%D0%B0%D1%82%D1%8C%D1%8F-22"). Probably (I'm not sure) because the ATE recognizes it as belonging to a specific section of the shortcode, the content one, not mentioned in the rule. Anyway, it doesn't work.
Just to be clear, I don't want to manually search every href to be translated, I need all of them to be registered for _mandatory_ translation. The is a reason for it: if you have a 300K symbols on a page translated to 38 languages, being not the top one in the hierarchy and with all (and many) escaped symbols in the URL, your (WPML) servers, I believe, just can't do the full job properly and just "forget" all manually added translations upon making any changes to the original - saving of the changes takes about half an hour sometimes, BTW. (Since I tried to work on a 24-core server with WordPress/php 45G memory limits and 1 billion vars on my side - and no luck, I believe that the reason is not the lack of resources here.) The resolving of this problem is pending for almost a year already (there is another ticket or two about it). So, I'm looking for another solution trough registering everything I _would_ choose manually for translation via the search bar to be translated mandatory, with the help of an appropriate config rule.
Best,

June 9, 2023 at 9:17 am #13798245

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I'm asking our 2nd tier support about this issue and update you here when I have something to share.

Thanks.

June 12, 2023 at 7:22 am #13806661

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

After discussing with our 2nd tier support, I'm afraid that there isn't a way to register the URL ""#%D1%81%D1%82%D0%B0%D1%82%D1%8C%D1%8F-22" as the main content in ATE. You still need to search for it and translate it. The same for the number.

Thanks for your understanding and patience.

June 15, 2023 at 11:31 am #13831675

olegA-5

That's too bad I can't have full control over what has to be translated automatically((

June 16, 2023 at 1:15 am #13835855

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Feel free to open new tickets if you have any questions. Thanks and have a good day 🙂