LOCO NOT TRANSLATE
-
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 6 years, 3 months ago by
silviofalconi.
-
This topic was modified 6 years, 3 months ago by
-
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
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”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?
I cannot publish it
the theme is “Basil” of Boxstudio
the file is on _theme/parts/header.phpif ( 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 fileYour theme already has a POT file. It’s here: https://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:
https://www.lamiaricetta.it/wp-content/themes/Basil_2.0.1/languages/it_IT.poSystem:
https://www.lamiaricetta.it/wp-content/languages/themes/basil-it_IT.poCustom:
https://www.lamiaricetta.it/wp-content/languages/loco/themes/basil-it_IT.poThis suggests you’ve done something wrong. Please provide complete information.
-
This reply was modified 6 years, 3 months ago by
Tim W.
yes I have the pot
Your theme already has a POT file. It’s here: https://www.lamiaricetta.it/wp-content/themes/Basil_2.0.1/languages/basil.potbecause I have another version Basil ( first version)
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.
ok I can try to insert basil on basil folder
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.pngand now I tried to insert the other folders on the config
see
https://i.postimg.cc/7Yz03rmm/k2.jpgHow we resolve ?
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?
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 ?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.jpgI translated the text Profile ( there is one text “Profile” I saved
now show the homepage of https://www.lamiaricetta.it you’ll see allways “Profile” instead of “Area riservata”
see the picture please
So are you convinced that something is wrong?
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.
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.
-
This reply was modified 6 years, 3 months ago by
- The topic ‘LOCO NOT TRANSLATE’ is closed to new replies.