WooCommerce: Localise some text button in storefront theme - php

I am making Wordpress/WooCommerce webiste, and I am using "Storefront" as theme, but now I have problem because I am not making website in English, so now I want to change buttons text, on example "View Basket", "Checkout" and "Add to Basket".
But I don't know where can I change it in code. Or what I need to do to change it?

You can install Storefront in a language of your choice. You might want to follow this guide https://docs.woothemes.com/document/installing-storefront-in-your-language/
There you will also find the link to create a custom WooCommerce Localization
You will need to decide what fits your needs.
Custom translations can basically be done by putting translation files into
wp-content/languages/themes/
For Storefront name the file
storefront-it_IT.mo
You will find more information on the refered link

Ok what is properly answer here, and most easiest solution: You should download translated files for your language, probably Wordpress community from your country did it already. So zipped files you should unzip and insert into
wp-content/languages/themes and wp-content/languages/plugins. You should have 2 files with .po and .mo extensions. After that simply go in your dashboard->settings->Site language: "Your language".
And that should be it.
https://docs.woothemes.com/document/installing-storefront-in-your-language/

Related

How to change "Your Order" title in woocommerce checkout (Customify theme) - translate to german

I am a complete novice and need to change the "Your Order" title to "Deine Bestellung" on the checkout page of my WordPress (WooCommerce) page, built with the Customify theme.
http://nachhaltige-bildung-afrika.de/checkout/
I tried various "translate" code snippets, but they didn't work. I cannot find the checkout.php fine in my theme folder. I have a child theme, but it isn't there either and adding code to the child functions.php also did not work. Anyone know how to change this? I would much appreciate your help. Thanks!
In most cases the used WordPress theme has a translation file in .po file format. The location of these files is in the directory of the theme itself (mostly in a language folder) or at wp-content/languages/themes or in a subfolder of a installed WordPress plugin.
You can edit these .po files with a tool called PoEdit. It 's freeware and ready to use after you 've downloaded it. Just open the .po file of your active theme and search for the phrase you want to translate. Keep in mind, that you have to create a new .po file in german format de_DE. In PoEdit you can chose at the beginning what you want to do. Just chose create translation from existing file. Then you have to chose the language you want to translate to and then just save this file.
Beware. Badly coded WordPress themes are not using the translation support of WordPress. To prove that, just have a look in the templates of your used theme and check, if the used phases are outputted with one of WordPress' l18n functions.
You can edit the .POT file of your main WordPress Theme adding the required string (in this case "Your Order") using a plain text editor, like Notepad++, Sublime or similar.
Just take the same format used on all the another rows presents in that file.
After that, the string appears readable and editable into the Poedit program.

I'm trying to change placeholder in WordPress theme, but I can't find where it's existing

I use a WordPress Woo-commerce template called "KuteShop", and I am trying to change the Placeholder Text "I'm searching for..." and "All Cate." as in the picture below:
but I can't do that, I searched everywhere, NOT in the Advanced editor, NOT in the Theme Options, NOT in the WordPress Settings, Nor in any place.
How can I modify it?
The process is really simple, KuteShop include a language file: "languages/kuteshop.pot"
You simply should open this file with the PoEdit application (that is distributed for free: https://poedit.net/), and create the language file for your website's language, entering a hypothetical translation of this text with the text you want to display on your website.

Loco Translate not shows all translations

I am using Loco Translate to translate wordpress and woocommerce. Great plugin, but unfortunately some string translations are not visible/working on the frontend at the checkout page and cart. Could this be a child team problem?
Strings are know in Loco Translate and correctly translated, they are only not showing up at frontend.
Translation String issues:
Have a coupon? Click here to enter your code.
Flat rate:
Subscribe to our newsletter
Site www.narwal.shop/checkout
Help is appreciated.
Go to wp-content and uploads directory. create a new directory and name it as same as the plugin name. then create a new directory and name it languages.
now upload your .po and .mo files in it.
the problem is solved!
Force WP to load the language file from languages/loco/themes/.. directory, like this inside functions.php:
add_action ( 'wp', 'load_translations' );
function load_translations() {
load_theme_textdomain( 'theme-name-here' );
}
Update: you should contact the creator of the (child) theme.
Every single component that displays text (i.e.: almost all of them), including themes and plugins, need to have included multilingual support for it to work.
Woocommerce does it, but you might have other components that do not. If you have a custom theme, that would be the first thing I'd check.
Unfortunately, if this is the case there is nothing you can do about it other than not use it, accept that that part of the site will not be translated or ask the developer who made them to put in the extra work to add multilingual support.
See also: https://localise.biz/wordpress/plugin/child-themes
In my case it was a wordpress language problem. I resolved this by changing it from English to my target translation language. To achive this in your wordpress panel go to: Settings -> General -> find language and change it.

Default text appears on wordpress

Actually i'm working on a wordpress website, which is related to school, i'm using universh WP theme which is purchased. I'm getting the below text as default:
Want create site? Find Free WordPress Themes and plugins.
See, i've marked those words. Actually its a dynamic page, i've checked the core code. It's only the
the_excerpt()
function. After that i don't have any idea, where it comes from. Also i've read this thread So please don't recommend that thread, its not working i've tried the way there mentioned.
P.S. Also the text will disappears when I login and try to edit the page.
What text editor You use ? Most easy way will be open folder with theme in some editor and search this string "Want create site? Find Free WordPress Themes and plugins." in all files - then You will know where they add it ... or You can check every file, because this string must be included somewhere, maybe in function.php they add some modification to the_excerpt();
I think when you ass content in post default editor then is not showing in the_expert() function
So you can add content in expert editor then after call the_expert() funtion
Check that your theme is not using the get_the_excerpt filter to prepend that phrase to all the excerpts.
Additional, if you only checked the files that load for that specific template, I would recommend that you run a search for that string for the entire theme. The source of the issue might stem from functions.php or even some JavaScript file.
Please update the core files or update version of your WordPress. Use Latest one.

Fails to change the language of a WP site

I'm building a WP site for a Spanish company, and I want to change the language of the site (not the admin area's language).
All the posts and the things that I put in the site are in Spanish, since I created them, but the default texts of the theme are in English (for instance, the string "search" inside the search box).
When I'm trying to change the language through Settings -> General -> Site language to "EspaƱol", it changes. But after I refresh the page it returns to "en_US" again, and in the bottom it says:
Note: The WPLANG constant in your wp-config.php file is no longer needed.
I did change the WPLANG in wp-confing.php to define('WPLANG','es_ES'), doesn't seem to help.
I am not sure if you have put the language files in the right place.
So, first you need to download spanish language files, you can find here
and then put them into /wp-content/langauges folder, if no, create it.
you can find full tutorial here
First, you have to download spanish version.
All files of wordpress system will translate to Spanish, BUT, some words of your current theme installed maybe are in english, you'll translate it.
In search.php you will find the input box, where you will change the word "Search.." this are in Apparence (Apariencia) -> Editor (Editor)
First, make sure the theme you are using is multi-language.
If no:
You need to translate the theme files located in wp-content/themes/
-EDIT:
You need to download the correct theme to your computer and manually edit the files within the theme folder, then upload it again.
Basically just go trough the theme code and replace the english text you see, for example "next post"/"previous post" to the correct sentence in Spanish in your case.
Just make sure to not edit anything you don't understand :)
Give me a shout if you need more help :)

Categories