688 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Uruguay
_rg_ says

I´m having a problem to preview my transations on a theme.

I have my theme/languages/es_ES.mo and es_ES.po and also en_US.mo and .po files.

On functions i have this:

load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );

    $locale = get_locale();
    $locale_file = TEMPLATEPATH . "/languages/$locale.php";
    if ( is_readable( $locale_file ) )
        require_once( $locale_file );

That is exactly the same way twenty does. I´ll echo the get_locale and it´s ok, but i can´t see the transations.

I also change on wp-config.php define (‘WPLANG’, ‘es_ES’); in order to use other lang.

The admin area, and common words like “Categories” are translated on fron end, so, i guess it´s not taking my language .mo or .po file and it is using the one from wp-content (actualy i have there one for es_ES too and that´s why i have the admin translated too)

But, i can´t preview my theme language one on fron end side. Any ideas?

1017 posts Best-dressed man at PressNomics 2013
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has attended an Envato Live event
  • Has been a member for 5-6 years
+5 more
Parallelus says

Are you using the __() and _e() functions to wrap your theme’s text areas?

Reference: http://codex.wordpress.org/Translating_WordPress#Localization_Technology

688 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Uruguay
_rg_ says

Yes sure!, but i fix it, was a path problem, thanks.

Problem solved!

by
by
by
by
by
by