Übersicht über das Problem
Bei der Verwendung des Shout-Themes mit WPML verlieren übersetzte Elemente die Felder und Layout-Einstellungen des Themes, der Text der oberen Leiste und die Footer-Seite bleiben in der Standardsprache, die Texte einiger Shortcodes werden nicht übersetzt und die Texte des vCard-Widgets können nicht übersetzt werden. Die Links zum vorherigen und nächsten Beitrag können auch zu einem Beitrag in einer anderen Sprache führen.
Problemumgehung
- Gehen Sie zu WPMLEinstellungen und öffnen Sie den Tab Benutzerdefinierte XML-Konfiguration.
- Fügen Sie diesen Code hinzu und speichern Sie:
XML
<wpml-config> <custom-fields> <custom-field action="translate">member_job</custom-field> <custom-field action="copy">_member_job</custom-field> <custom-field action="translate">member_byline</custom-field> <custom-field action="copy">_member_byline</custom-field> <custom-field action="translate">below_headings_text</custom-field> <custom-field action="copy">_below_headings_text</custom-field> <custom-field action="translate">testimonial_subheading</custom-field> <custom-field action="copy">_testimonial_subheading</custom-field> <custom-field action="translate">pirenko_rotating_text</custom-field> <custom-field action="copy">_pirenko_rotating_text</custom-field> <custom-field action="copy">featured_header</custom-field> <custom-field action="copy">_featured_header</custom-field> <custom-field action="copy">show_sidebar</custom-field> <custom-field action="copy">_show_sidebar</custom-field> <custom-field action="copy">sidebar_pos</custom-field> <custom-field action="copy">_sidebar_pos</custom-field> </custom-fields> <admin-texts> <key name="prk_shout_options"> <key name="bar_left_text_1"/> <key name="theme_divider"/> <key name="woo_subheading"/> <key name="bottom_page_id"/> </key> </admin-texts> <shortcodes> <shortcode> <tag>pirenko_contact_info</tag> <attributes> <attribute>company_name</attribute> <attribute>street_address</attribute> <attribute>locality</attribute> <attribute>postal_code</attribute> <attribute>tel</attribute> <attribute>fax</attribute> <attribute>hours</attribute> <attribute>email</attribute> </attributes> </shortcode> <shortcode> <tag>prk_sitemap</tag> <attributes> <attribute>txt_pages</attribute> <attribute>txt_blog_cats</attribute> <attribute>txt_posts</attribute> <attribute>txt_port_posts</attribute> </attributes> </shortcode> </shortcodes> </wpml-config>
- Gehen Sie zu WPMLString-Übersetzung. Übersetzen Sie die Texte der oberen Leiste und übersetzen Sie
bottom_page_idin die ID der übersetzten Footer-Seite. - Übersetzen Sie Ihre Seiten und Elemente erneut, damit deren Übersetzungen die Felder erhalten.
- Fügen Sie für das vCard-Widget ein Widget pro Sprache hinzu und legen Sie dessen Sprache in den Widget-Einstellungen fest.
- Für die Links zum vorherigen und nächsten Beitrag können Sie die Beitragsnavigation in den Theme-Optionen deaktivieren, bis der Theme-Autor dies behebt.