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

tonytc on "Translating text in theme with polylang"

$
0
0

Hi, I'm new to Wordpress as of one week ago and I just built my first site. It's multilingual and I went for thr polylang plugin which seems to work pretty well for the nav bar and content created in the wp-admin area etc but I can't get it to work for the text strings in my theme. for example, in my footer I have:
<p><?php _e('web by Tony','Dora');?></p>

and in functions.php I have included:

function setup() {
	load_theme_textdomain('Dora', get_template_directory());
}

but the text is not translated when I switch languages.

I went to localization in the admin area and chose "themes" and scanned. It sees the text, I add a translation and then generate an .mo and .po file but still no translations. Can anyone advise me what I am missing?

ps. The does the setup function in the functions.php file get called automatically by wp when it runs?


Viewing all articles
Browse latest Browse all 11471

Trending Articles



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