php - Wordpress string translation function output blank -


i have done following:

  • wrapped non content managed string translations in __() or _e() functions.
  • added following function.php file:
//add localisation load_theme_textdomain('whitelabel', get_template_directory() . '/languages'); //set locale $locale = get_locale(); $locale_file = get_template_directory() ."/languages/$locale.php";  if ( is_readable( $locale_file ) ) require_once( $locale_file ); 
  • used poedit create translation file , have test translation see if it's works nothing displayed either.
  • checked php info gettext make sure it's enabled.

    however see on page blank spaces translations functions are. should defaulting text right? english.

what doing wrong? i've spend lot of time looking in this. way i'm not totally sure $locale.php removing makes no difference. me seems problem functions.

thanks in advance.

turns out had php error on page blocking rest of translations.

problem solved. noted few instances __() had been used _e() should have been.


Comments

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -