2

I'm prepping my theme for translation. I've added the following line to my functions.php, and added the text domain within my theme files.

<?php /*** LOAD THEME TEXTDOMAIN ***/
load_theme_textdomain( 'mytheme', get_template_directory() . '/languages' );

$locale = get_locale();
$locale_file = get_template_directory() . "/languages/$locale.php";

if ( is_readable( $locale_file ) ) {
    require_once( $locale_file );
}

?>

I've used poedit to generate my po files. It is finding some of the strings that are labeled with the text domain, but it's not finding my menu items, categories, or tags. Guessing I'm missing something?

I did some digging and I couldn't find any answers. Ultimately this is for a front-end translation - wp admin will remain in english.

BTW, the menu is based on wp-bootstrap-navwalker

  • ok, so i did a wp export using the default functionality in wp admin, and i noticed that my categories are included in the xml file. but i don't see the strings contained in my menu items. where do these live? seems they're not being pulled into my export or my .po files. i had a look at the translation docs at wordpress.org, and they seem to deal mainly with translating wordpress itself, but i'm not finding much about translating the actual content for a front-end translation. thanks for your help! – roybatty Aug 6 '14 at 15:00
0

check this link: https://wiesmann.codiferes.net/wordpress/?p=25829

for translater your themes add Xili... Plugins that is multilanguages plugin. in there you can make po. file in Languages folder in themes folder, and translater it to any languages you want.

good luck

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.