688 posts
    Has been part of the Envato Community for over 6 years Has referred 1+ members Has sold $5,000+ on Envato Market Has collected 10+ items on Envato Market
+3 more
_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?

1029 posts Best-dressed man at PressNomics 2013
    Made it to the Authors' Hall of Fame Had an item featured on Envato Market Power Elite Author: Sold more than $1M on Envato Market Has sold $1M+ on Envato Market and is now a Power Elite Author
+10 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
    Has been part of the Envato Community for over 6 years Has referred 1+ members Has sold $5,000+ on Envato Market Has collected 10+ items on Envato Market
+3 more
_rg_ says

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

Problem solved!

by
by
by
by
by
by