wordpress _e function in function.php -


i'm trying create multilanguage wordpress site. in functions.php have custom breadcrumbs

$text['home'] = 'main'; // text main $text['category'] = '%s'; // text category if ($show_home_link == 1) echo sprintf($link, $home_link, $text['home']); 

i want put _e function word 'main', generate .po file , change word 'main' selected language.

i trying use

<?php _e('main', templatename); ?> 

instead of 'main' such as

$text['home'] = '_e('main', templatename)'; // text main 

but _e('main', templatename) instead of main.

give advice please, how can it? know, problem syntax, i'm new in php. thank you.

using <?php _e('main', 'templatename'); ?> display translated string main.

if want store value in variable, need use <?php $text['home'] = __('main', 'templatename'); ?>


Comments