Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing an issue where the blog page style broke after adding another language. Additionally, the client wanted to make the footer in Arabic RTL without adding separate widgets, but when switching to Arabic, the footer remained LTR.

Solution:
Firstly, the issue with the blog page style was resolved by the client by adding some posts in the other languages. Regarding the RTL direction for the footer in Arabic, we suggested that this is a theme-related issue rather than a WPML issue. A custom CSS solution could be applied, but it might be complex. Here is an example of a CSS rule that could be used to align text to the right when in the Arabic language:

:lang(ar) > #block-38 > div {<br />  text-align: right;<br />}

We also suggested that the client could try creating separate widgets for each language by going to Appearance > Menus and following our guide on translating widgets.
If the issue persists, we recommended contacting Astra Support for further assistance, as they suggest creating a Child Theme with Custom CSS for RTL support, which can be found here: RTL CSS via Child Theme.

Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If this is the case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket with us.

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 7 replies, has 3 voices.

Last updated by Andreas W. 1 year, 6 months ago.

Assisted by: Andreas W..

Author Posts
February 8, 2024 at 1:18 pm #15281363

raymonts

Hello,

After I added the other language, the blog page style broke:
hidden link
It's working well in English only.

February 8, 2024 at 6:29 pm #15282865

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly. How are you setting the design for your blog page in the original language? Are you using a page builder, templates, theme settings, etc? Once we have more information about that, we can help point you in the direction of how to correctly translate it.

February 8, 2024 at 6:36 pm #15282882

raymonts

I already provide debug information, I'm using Astra theme and spectra

February 8, 2024 at 6:38 pm #15282885

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please increase your WP Memory limit to 256M? 128M is the minimum required by WPML.
Your current values are:

PHP Memory Limit 256M
WP Memory Limit 40M
Add this code to your wp-config.php to increase WP memory:

define('WP_MEMORY_LIMIT', '256M');

Paste it just before:

/ That's all, stop editing! Happy blogging. /

Now, verify the current settings at WPML > Support > WordPress. Then complete the translation again.

These settings can be limited directly by your hosting provider, so I recommend you contact and ask them to modify them directly.
If you can get even higher values It would be great.

https://wpml.org/home/minimum-requirements/
Note: WPML needs a minimum WP Memory limit of 128M to work only under a minimal environment, which means, with a default theme and no other plugins installed.

If this will still not solve the issue, please let me know.

Best regards
Andreas

February 8, 2024 at 6:59 pm #15283018

raymonts

Thanks, the problem was solved when I added some posts in the other languages.
I don't know why the style didn't display before I added some content; maybe it's an Astra bug.
Anyway, I have a question related to RTL direction:
I want to make the footer in Arabic RTL without adding separate widgets; is this possible?

ozel.png
February 8, 2024 at 7:47 pm #15283145

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I am not sure if I understand your request, as the Arabic Footer is using RTL, otherwise the logo would be on the left side.

Could you please explain in more detail, what you are trying to achieve?

February 8, 2024 at 7:55 pm #15283164

raymonts

when I change lang. to Arabic
the footer still in LTR I need to change it automatic when i change lang to Arabic and make it RTL.

February 8, 2024 at 8:28 pm #15283341

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I see, the footer is using RTL, as the logo is on the right, but the text is not aligned to the right inside each widget.

Now, this is not a WPML issue, as this is theme-related.

I was trying to find a custom CSS solution, but it seems to be kind of complex in this case.

Example:

:lang(ar) > #block-38 > div {
  text-align: right;
}

This usually should be a CSS rule for a specific widget here to make the text appear aligned to the right only when in the Arabic language. ( I did not test this)

You could also try to create one widget per language and each widget manually at Appearance > Menus.

Guide:
https://wpml.org/documentation/getting-started-guide/translating-widgets/#using-different-widgets-for-different-languages

If this will not solve the issue, please contact Astra Support about this, as this is controlled by the theme's CSS files.

I see they suggest creating a Child Theme with Custom CSS for this purpose:
hidden link