バイリンガル設定

Polylang

(word press dashboard) Languages >>> strings translation へ項目追加

(word press dashboard) Appearance >>> Editor にコード追加

function.php

/**
 *  TRANSLATION PART
 */

/* JUMBOTRON PART */
pll_register_string( 'Button', get_theme_mod( 'illdy_jumbotron_general_first_button_title', __( 'Learn more', 'illdy' ) ), 'illdy' );
pll_register_string( 'Download', get_theme_mod( 'illdy_jumbotron_general_second_button_title', __( 'Learn more', 'illdy' ) ), 'illdy' );
pll_register_string( 'Jumbotron Tag Line', get_theme_mod( 'illdy_jumbotron_general_entry', __( 'lldy is a great one-page theme, perfect for developers and designers but also for someone who just wants a new website for his business. Try it now!', 'illdy' ) ), 'illdy' );
pll_register_string( 'First Word Header', get_theme_mod( 'illdy_jumbotron_general_first_row_from_title', __( 'Clean', 'illdy' ) ), 'illdy' );
pll_register_string( 'Second Word Header', get_theme_mod( 'illdy_jumbotron_general_second_row_from_title', __( 'Slick', 'illdy' ) ), 'illdy' );
pll_register_string( 'Third Word Header', get_theme_mod( 'illdy_jumbotron_general_third_row_from_title', __( 'Perfect', 'illdy' ) ), 'illdy' );

/* ABOUT-US SECTION */
pll_register_string( 'About-us', get_theme_mod( 'illdy_about_general_title', __( 'About', 'illdy' ) ), 'illdy' );
pll_register_string( 'About-us-entry', get_theme_mod( 'illdy_about_general_entry', __( 'It is an amazng one-page', 'illdy' ) ), 'illdy' );


/* TESTMONIAL SECTION */
pll_register_string( 'testimonials', get_theme_mod( 'illdy_testimonials_general_title', __( 'Testimonials', 'illdy' ) ), 'illdy' );
pll_register_string( 'testimonials-entry', get_theme_mod( 'illdy_testimonials_general_entry', __( 'Amazng page', 'illdy' ) ), 'illdy' );


/* BLOG SECTION */
pll_register_string( 'Latest News', get_theme_mod( 'illdy_latest_news_general_title', __( 'Latest News', 'illdy' ) ), 'illdy' );
pll_register_string( 'Latest News Entry', get_theme_mod( 'illdy_latest_news_general_entry', __( 'If you are interested in the latest articles', 'illdy' ) ), 'illdy' );

/* PROJECT SECTION */
pll_register_string( 'Projects', get_theme_mod( 'illdy_projects_general_title', __( 'Projects', 'illdy' ) ), 'illdy' );
pll_register_string( 'Projects entry', get_theme_mod( 'illdy_projects_general_entry', __( 'Project entry', 'illdy' ) ), 'illdy' );

/* SERVICES SECTION */
pll_register_string( 'Services title', get_theme_mod( 'illdy_services_general_title', __( 'Services', 'illdy' ) ), 'illdy' );
pll_register_string( 'Services entry', get_theme_mod( 'illdy_services_general_entry', __( 'Discover our services', 'illdy' ) ), 'illdy' );

/* TEAM SECTION */
pll_register_string( 'Team', get_theme_mod( 'illdy_team_general_title', __( 'Team', 'illdy' ) ), 'illdy' );
pll_register_string( 'Team entry', get_theme_mod( 'illdy_team_general_entry', __( 'Team entry', 'illdy' ) ), 'illdy' );


/* CONTACT-US SECTION */
pll_register_string( 'Contact-us', get_theme_mod( 'illdy_contact_us_general_title', __( 'Contact us', 'illdy' ) ), 'illdy' );
pll_register_string( 'Contact-us-general', get_theme_mod( 'illdy_contact_us_general_entry', __( 'And we will get in touch as son as possible.', 'illdy' ) ), 'illdy' );
pll_register_string( 'Contact-us-general', get_theme_mod( 'illdy_contact_us_general_address_title', __( 'Address', 'illdy' ) ), 'illdy' );
pll_register_string( 'Custumer support', get_theme_mod( 'illdy_contact_us_general_customer_support_title', __( 'Customer Support', 'illdy' ) ), 'illdy' );

Sections >> *.php を置き換える

<?php if( $general_title ): ?> <div class="col-sm-12"> <h3><?php echo illdy_sanitize_html( pll_e( $general_title ) ); ?></h3> </div><!--/.col-sm-12--> <?php endif; ?>

echo do_shortcode( wp_kses_post( を echo illdy_sanitize_html( pll_e(  に置き換える。