Overview of the Issue
When using the Shout theme with WPML, translated items lose the theme’s fields and layout settings, the top bar text and the footer page stay in the default language, the texts of some shortcodes are not translated, and the vCard widget texts cannot be translated. The previous and next post links can also lead to a post in another language.
Workaround
- Go to WPMLSettings and open the Custom XML Configuration tab.
- Add this code and save:
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>
- Go to WPMLString Translation. Translate the top bar texts, and translate
bottom_page_idinto the ID of the translated footer page. - Translate your pages and items again, so their translations get the fields.
- For the vCard widget, add one widget per language and set its language in the widget settings.
- For the previous and next post links, you can turn off the post navigation in the theme options until the theme author fixes it.