Navigation überspringen

Dieses Thema ist gelöst. Hier finden Sie eine Beschreibung des Problems und der Lösung.

Problem:
Wenn Sie feststellen, dass nach dem Wechsel in die englische Version Ihrer Website der Header- und Footerbereich übersetzt wird, der Bodybereich jedoch leer erscheint, könnte dies an den Einstellungen Ihrer benutzerdefinierten Felder liegen.

Solution:
Stellen Sie sicher, dass die Textinhalte in Ihrem benutzerdefinierten Theme mit der gettext-Funktion und den entsprechenden Textdomänen umschlossen sind, damit Sie diese mit der String Translation-Funktion von WPML übersetzen können. Folgen Sie den Anweisungen in unserer Dokumentation:

Überprüfen Sie die Einstellungen für benutzerdefinierte Felder unter "WPML > Einstellungen > Benutzerdefinierte Feldübersetzung" und stellen Sie sicher, dass diese auf "Übersetzbar" gesetzt sind. Wenn Sie Änderungen vornehmen, sollten Sie die Inhalte im Übersetzungseditor sehen und übersetzen können.

Wenn das Problem weiterhin besteht, überprüfen Sie, ob das 'lang'-Attribut im HTML-Code Ihrer Seite korrekt für jede Sprache geladen wird. Für Englisch sollte es beispielsweise "en_US" sein. Konsultieren Sie gegebenenfalls den Entwickler Ihres Themes.

Sollte diese Lösung nicht relevant erscheinen, öffnen Sie bitte ein neues Support-Ticket unter WPML-Supportforum.

Dies ist das technische Support-Forum für WPML – das mehrsprachige WordPress-Plugin.

Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team antwortet im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.

Schlagwörter: 

Dieses Thema enthält 5 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Prosenjit Barman Vor 1 Jahr, 5 Monaten.

Assistiert von: Prosenjit Barman.

Autor Beiträge
Januar 6, 2024 um 6:49 pm #15156913

henriF-5

Die Website nassau-oranien.de wurde mit WPML automatisch übersetzt.
Wenn man auf die englische Version schaltet, werden der Headerbereich und der Footerbereich übersetzt angezeigt. Der Bodybereich erscheint leer. Siehe Bild.

Der Sprachen-Switch wurde deshalb vorläufig deaktiviert.

screenshot-nassau.jpg
Januar 8, 2024 um 7:47 am #15158455

Prosenjit Barman
WPML-Unterstützer seit 03/2023

Sprachen: Englisch (English )

Zeitzone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support. Sorry for the delay in responding due to the weekend.

To reduce the waiting time, I took this ticket and responded in English. Please let me know if you're okay with it or want to continue the conversation in German. I will be happy to forward this ticket to one of my German-speaking colleagues.

I understand the issue you're having. Upon checking, it appears that you are using a custom theme for your website, and the contents in the homepage seems to be embedded directly within the theme itself. This observation is based on the absence of any builder classes in the site's markup.

Since you're using a custom theme, it's essential to integrate WPML compatibility within the theme so that the WPML can handle the translations properly. If you've incorporated content directly into the theme files, you need ensure that texts contents are enclosed within the gettext function, with the the appropriate text domains. This approach will enable you to translate such hard-coded content using the String Translation feature in WPML.

For further guidance and detailed instructions, I recommend checking the relevant WPML documentation.
- https://wpml.org/documentation/support/translating-the-theme-you-created/
- https://wpml.org/documentation/support/achieving-wpml-compatibility-for-your-themes-and-plugins/#translating-theme-plugin-custom-elements

I hope you can understand. For your information, In the header and footer, only the menu appears translated since you've translated the pages associated with the menu(WPML can detect and automatically updated the menu items in other language based on the availability of translation.)

However, if the content has been added through a different approach, please let me know about it so that I can check and provide you with the appropriate guidance.

Looking forward to your response.

Best regards,
Prosenjit

Januar 9, 2024 um 8:04 am #15163136

henriF-5

The content is created with content blocks which are inserted into the pages. Both the content blocks and the pages are translated but no content blocks are loaded into the translated pages. Maybe this is related to the page URLs also being translated.

content-element-insertion.png
content-element-overview.png
Januar 9, 2024 um 5:18 pm #15166010

henriF-5

We can grant you access to the WordPress backend if this helps to solve the problem. Let us know and we will sent the Login-Data.

Januar 10, 2024 um 3:11 am #15167115

Prosenjit Barman
WPML-Unterstützer seit 03/2023

Sprachen: Englisch (English )

Zeitzone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update.

From the screenshot, I can see that the content blocks are assigned properly to the page. Since the page contents still not showing correctly, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
versteckter Link

Looking forward to your response.

Best Regards,
Prosenjit

Januar 11, 2024 um 6:18 am #15172249

Prosenjit Barman
WPML-Unterstützer seit 03/2023

Sprachen: Englisch (English )

Zeitzone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for sharing the access information.

I have investigated the issue you're facing and including my findings below.

Upon checking, I found that the content on your homepage is added in custom fields that are included within each content block. In WPML Settings, the translation preferences for all these fields were set to "Not Translatable." This was why the content wasn't appearing in the translation editor and wasn't being translated. By modifying the translation preference for these fields, I managed to make the content visible and translatable in the Translation editor. Here is a breakdown of the process:

- For instance, on the homepage, there is a content block named "Startseite - allg. Informationen - farbige Textbox - DE," which contains a headline.
- I identified the field's name by inspecting this content block.
- Then, I navigated to "WPML > Settings ↳ Custom field translation" and selected "Show system field."
- Searching for the term "_mprivat_" brought up all the custom fields where you've added content.
- The field name for the headline (_mprivat_section_headline) appeared in the results. I changed its translation preference to "Translatable."
- After making a slight modification in the content block, I updated the translation. The content added within the custom field was visible in the Translation editor, where I added the translations and saved the changes.
- I also noticed that the correct content block was not included in the English version of the Homepage, so I adjusted the translation preference for the "_mprivat_blocks_repeat_group" field group to "copy." This ensures that the content group appears correctly in the English version.

However, despite these changes, the German content was showing in the English version of the site. On inspecting the English site, I found that the "Lang" attribute was displaying the value for the German language(de). This might be why the English contents aren't displaying correctly on the frontend. Please check the attached screenshot.

Given that you're using a custom theme, it's important to note that providing support for custom code/themes/plugins is beyond the scope of our support. However, I suggest checking within the theme to ensure that the correct language loads in the 'lang' attribute of the HTML, which should help the English content display correctly. Specifically, verify if the 'lang' attribute value is loading dynamically for each language. For english, it should be "en_US". You can also consult the theme developer about this issue.

I'm hopeful that after adjusting the translation preferences for all the custom fields(_mprivat_)and addressing the 'lang' issue, the content will display correctly on the frontend. If you need any further assistance or have additional queries, feel free to reach out. I'm here to help.

Best regards,
Prosenjit

Screenshot 2024-01-11 114843.png