Tag Info

New answers tagged


Take a closer look at next_post_link and previous_post_link. Specifically; how the function arguments are arranged. Next, take a closer look at translating strings; and how the function arguments are arranged. Now, when you put the two together; you should have something like this: <?php previous_post_link( '<span class="meta-nav"> %link ...


I think I found a solution, but before a little Premise load_theme_textdomain() and load_child_theme_textdomain() are basically equal, the only difference is the default path they use: they get the current language (using get_locale()) and add the relative .mo file to the path passed as argument; then they call load_textdomain() passing as argument both ...


You can use language files that are in your child theme folder. First you have to know which text domain the parent theme is using. Then create the .po and .mo files with only your language as the file name (e.g. de_DE.po/de_DE.mo or nl_NL.po/nl_NL.mo) and put them into a folder within your child theme directory, "languages" for example. You can then ...


You could use gettext filter: add_filter( 'gettext', 'cyb_filter_gettext', 10, 3 ); function cyb_filter_gettext( $translated, $original, $domain ) { // Use the text string exactly as it is in the translation file if ( $translated == "Categorie: %s" ) { $translated = "Sectie: %s"; } return $translated; }

Top 50 recent answers are included