WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How can I change only the theme language? (8 posts)

  1. Arthur Ara˙jo
    Member
    Posted 1 year ago #

    I dont now how to do... I wont change the wordpress languange, but only the template language. How can I do this?

    thx

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Is your theme translation-ready?

  3. Arthur Ara˙jo
    Member
    Posted 1 year ago #

    Yeah, Im using the responsive theme.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    In that case, it should be possible to create a new language pack for the theme. I'd suggest reviewing I18n_for_WordPress_Developers for information on creating language files and posting on http://themeid.com/forum/forum/10/responsive-theme/ if you need any theme-specific help.

  5. Arthur Ara˙jo
    Member
    Posted 1 year ago #

    The .mo and .po exists, I just wanna change only the language template and I dont now how to do.

  6. Arthur Ara˙jo
    Member
    Posted 1 year ago #

    There is no command line to do this? Like a:

    define('theme_template_language', 'en_UK');

    [No bumping. If it's that urgent, consider hiring someone. Or try reading the response above.]

  7. Arthur Ara˙jo
    Member
    Posted 1 year ago #

    I got it! I used the command line:

    load_textdomain('responsive', get_template_directory().'/languages/pt_BR.mo');

    I found a page that explained something like my question: http://wordpress.org/support/topic/how-to-change-language-in-each-page?replies=9

    And this simple command line gave me all I need. Thank you for the support and sorry my bad english.

    o/

  8. Arthur Ara˙jo
    Member
    Posted 1 year ago #

    Just for complement, the comment wasnt translated because the responsive theme uses the wordpress default code in this case. So, I added this code to completly work:

    add_filter( 'locale', 'change_locale' );
    function change_locale(){ return 'pt_BR'; }
    load_default_textdomain();

    load_textdomain('responsive', get_template_directory().'/languages/pt_BR.mo');

    I put in the header.php, and thats works fine for me.

    thx!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.