Обзор проблемы
При использовании темы оформления Shout с WPML переведенные элементы теряют поля и настройки макета темы, текст верхней панели и страница подвала остаются на языке по умолчанию, тексты некоторых шорткодов не переводятся, а тексты виджета vCard невозможно перевести. Ссылки на предыдущую и следующую запись также могут вести на запись на другом языке.
Обходное решение
- Перейдите в WPMLНастройки и откройте вкладку Пользовательская конфигурация XML.
- Добавьте этот код и сохраните:
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>
- Перейдите в WPMLПеревод строк. Переведите тексты верхней панели и переведите
bottom_page_idкак ID переведённой страницы подвала. - Переведите Ваши страницы и элементы ещё раз, чтобы в их переводах появились поля.
- Для виджета vCard добавьте по одному виджету для каждого языка и задайте его язык в настройках виджета.
- Для ссылок на предыдущую и следующую запись Вы можете отключить навигацию по записям в параметрах темы оформления, пока разработчик темы не исправит это.