Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

jrstaatsiii on "[Plugin: Polylang] Localized Files"

$
0
0

Here is what I have chouby:

in functions.php:

function ssm_localize_theme() {

	    // Retrieve the directory for the localization files
	    $lang_dir = CHILD_DIR . '/languages';

	    // Set the theme's text domain using the unique identifier from above
	    load_theme_textdomain('zoll', $lang_dir);

	} // end ssm_localize_theme
	add_action('after_setup_theme', 'ssm_localize_theme');

And then where necessary I have the items localized in the theme, like so:

<div class="language-picker">

	<h4><?php _e('Choose Your Preferred Language', 'zoll'); ?></h4>

	<?php pll_the_languages(array('dropdown'=>1));  ?>

</div>

Is this not correct?


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>