• I installed only one theme, the theme is “Basil” and it not found all words, How I can resolved ?
    the words are included with esc_html__ functions sample esc_html__( ‘Profile’, ‘basil’ )

    and it are on _theme/parts folder

    I set on setup advanced this folders also

    but Loco non translate why ?

    why loco non found it ?

    • This topic was modified 5 years, 5 months ago by silviofalconi.
Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Tim W

    (@timwhitlock)

    You are not clear on what you’ve done that is not working. Are you expecting something to translate automatically?

    Does the theme ship with a POT template? If not, have you tried extracting strings?

    Try the beginners guide to translating existing themes: https://localise.biz/wordpress/plugin/beginners

    Thread Starter silviofalconi

    (@silviofalconi)

    Sorry I ‘m not a beginner I am old
    I allready made it
    I had to translate “to hand” some texts because locotanslate did not find them both in the theme and in the plugin whose author already got angry because I accused him of not having inserted the phrases to be translated into the right position
    We users and web creators do not pop up because we do not find the phrases to translate, certainly I hoped that locotranslate could give me a hand in translating the texts but it is now 5 days that I lost my time so I had to do “to hand”

    Plugin Author Tim W

    (@timwhitlock)

    Ok, well string extraction of the code you’ve shown is well supported in Loco Translate and the esc_html__ function is known to work.

    Normally at this point I ask for you to post the theme, but it appears this is a commercial theme so I cannot offer help debugging it.

    You’re still not being clear about which point in the workflow you encounter a problem? Is it the string extraction or the “translation” (display) of the strings that doesn’t work? Perhaps you could post a download link to the POT and PO files that you’ve created?

    Thread Starter silviofalconi

    (@silviofalconi)

    I cannot publish it
    the theme is “Basil” of Boxstudio
    the file is on _theme/parts/header.php

    	if ( is_user_logged_in() ):
    
    								echo '<div class="basil-profile-button"><a class="bx-button" href="' . esc_url( get_permalink( $_cooked_settings['profile_page'] ) ) . '">' . esc_html__( 'Profile', 'basil' ) . '</a></div>';
    								echo '<div class="basil-signout-button"><a class="bx-button bx-button-alt" href="' . esc_url( wp_logout_url( get_home_url() ) ) . '">' . esc_html__( 'Sign Out', 'basil' ) . '</a></div>';
    
    							else:
    
    								echo '<div class="basil-profile-button"><a class="bx-button" href="' . esc_url( get_permalink( $_cooked_settings['profile_page'] ) ) . '">' . esc_html__( 'Sign In', 'basil' ) . '</a></div>';
    
    							endif;

    on PO/MO file there are “Sign Out” and “Sign In” but not “Profile”
    the text “Sign Out” and “Sign In” are traslated but then I have also this text on my page (lamiaricetta.it) see on top
    the text “Profile” is not on MO/PO file

    Plugin Author Tim W

    (@timwhitlock)

    Your theme already has a POT file. It’s here: http://www.lamiaricetta.it/wp-content/themes/Basil_2.0.1/languages/basil.pot

    This file already contains the “Profile” string. You do not need to extract strings at all, so let’s forget about the code. You don’t need to worry about it.

    Is this file configured as the template for the theme in the settings? It should have been by default, because it’s the standard location.

    What happens when you sync your PO file to this POT file?

    I notice that you’ve installed your file into a folder called “Basil_2.0.1” and not “basil”. If WordPress tries to auto-load your translation files, it will probably get tripped up by that.

    Where are your translation files? They are not at any of these locations:

    Author:
    http://www.lamiaricetta.it/wp-content/themes/Basil_2.0.1/languages/it_IT.po

    System:
    http://www.lamiaricetta.it/wp-content/languages/themes/basil-it_IT.po

    Custom:
    http://www.lamiaricetta.it/wp-content/languages/loco/themes/basil-it_IT.po

    This suggests you’ve done something wrong. Please provide complete information.

    • This reply was modified 5 years, 5 months ago by Tim W.
    Thread Starter silviofalconi

    (@silviofalconi)

    yes I have the pot
    Your theme already has a POT file. It’s here: http://www.lamiaricetta.it/wp-content/themes/Basil_2.0.1/languages/basil.pot

    because I have another version Basil ( first version)

    Plugin Author Tim W

    (@timwhitlock)

    This is the theme that is active on your site.

    The fact remains that the normal file locations for the basil text domain are absent and you’ve not stated what they are like I asked.

    If I am making the wrong guesses, then consider providing more complete information so I don’t have to guess.

    Thread Starter silviofalconi

    (@silviofalconi)

    ok I can try to insert basil on basil folder

    Thread Starter silviofalconi

    (@silviofalconi)

    Tim
    I installed the theme basi as you sad
    I have the same problem
    Loco translate not founded “Sign Out” , “Sign In” and “Profile” text
    the translation file come with the release
    see
    https://i.postimg.cc/65C47LpP/k0.png
    https://i.postimg.cc/bN0dYy6c/k.png

    Thread Starter silviofalconi

    (@silviofalconi)

    and now I tried to insert the other folders on the config
    see
    https://i.postimg.cc/7Yz03rmm/k2.jpg

    How we resolve ?

    Plugin Author Tim W

    (@timwhitlock)

    You don’t need to care about the source paths because you already have a POT file. This is only required if you intend to extract your own strings. As we’ve agreed – you’re not.

    Your first screenshot tells me you’ve created no translation files for the text domain “basil”. This would explain why nothing is working. Just add a language for the Basil domain, select Italian and the strings from the POT file will be used. What part of that is not working?

    The empty file in your second screenshot is for the text domain “carbon-fields” what does this have to do with the basil theme?

    Thread Starter silviofalconi

    (@silviofalconi)

    tim,
    the basil theme have allready a file translated on italian language see on bottom of picture (97%) why I must re-create another file ?

    Thread Starter silviofalconi

    (@silviofalconi)

    ok.
    you sad basil not have a language file
    Now I created a New file as you can see on picture
    https://i.postimg.cc/wM49BQf7/created-new-file.jpg

    I translated the text Profile ( there is one text “Profile” I saved

    now show the homepage of http://www.lamiaricetta.it you’ll see allways “Profile” instead of “Area riservata”

    see the picture please

    So are you convinced that something is wrong?

    Plugin Author Tim W

    (@timwhitlock)

    the basil theme have allready a file translated on italian language see on bottom of picture (97%) why I must re-create another file ?

    So your question is why is the Basil theme not picking up its own translations? How is this relevant to Loco Translate? Loco Translate is not involved in this process at all.

    Your screenshot clearly shows that no translation files are found related to the Basil theme. This may explain why the Italian files are not loading. (they are listed as additional) But Loco Translate is not responsible for loading them – the theme is.

    Plugin Author Tim W

    (@timwhitlock)

    From what you’ve shown me the Basil theme does not seem to load the basil text domain, but without seeing the theme source code I can’t say why. All I can see is you have a mess.

    I think you should go to your theme support and ask them how to translate it. Don’t ask them how to use Loco Translate, but how you should translate their theme.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘LOCO NOT TRANSLATE’ is closed to new replies.