• Resolved weeix

    (@weeix)


    Hello Chouby,

    I’m trying to Translate Proyecto theme by following your guide. The translation is running smoothly but some elements couldn’t be translated.

    • Theme’s front-end could be translated without problem
    • Some of the theme’s back-end could be translated

    I notice that the problem occurs with files within a sub-folder in the theme folder (In this case, its Proyecto\admin\theme-admin.php)

    qTranslate doesn’t have such issue, so I think I should report this to you 🙂

    Thanks for making this plugin, Wee.

    http://wordpress.org/extend/plugins/polylang/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Chouby

    (@chouby)

    How do you load the text domain? The theme itself does not contain any load_theme_textdomain. Did you write it yourself? If yes could you explain what you did?

    Moreover, I noticed that the theme uses different text domains depending on the file. Examples:

    in theme_admin.php:
    _e( 'Proyecto Theme' ) -> default textdomain
    _e( 'Favicon', 'proyecto' ) -> proyecto texdomain
    in index.php:
    _e('Recent Projects','fotos') -> fotos texdomain

    Only one theme domain ‘proyecto’ should be used.

    Thread Starter weeix

    (@weeix)

    Oh yes I forgot to tell you that I loaded the text domain in the child theme with these codes in function.php :

    add_action( 'after_setup_theme', 'overwrite_settings' );
    
    function overwrite_settings() {
    	load_theme_textdomain('proyecto', get_template_directory() . '/lang'); // Fix Parent Theme Localization
    	load_child_theme_textdomain( 'hynae', get_stylesheet_directory() . '/languages' ); // Child Theme Localization
    }

    I’ll try to fix it in the child theme and come back here to report.

    Thanks for all your hardwork. I really appreciate it.

    Thread Starter weeix

    (@weeix)

    Solved by using remove/add_actions in the child theme’s functions.php and change every texts to use the same textdomain (as my child theme)

    🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing translation for my-theme/sub-folder/file.php’ is closed to new replies.