Traslation for read more, older/newer posts, search

eCommerce WordPress theme with various e-store features and WooCommerce support.
GK User
Sun Dec 21, 2014 2:52 am
Hi. How can I translate "read more", "older/newer posts" and "search" in woocommerce product search results (Archive page I guess)? I tried with language files, but it doesn't work.
User avatar
Senior Boarder

GK User
Sun Dec 21, 2014 1:05 pm
Hi,
if I remember woocommerce has its own language files. So start from this part.
Second check template language files, if you didn't before.
User avatar
Platinum Boarder

GK User
Mon Dec 22, 2014 1:38 am
These expressions are not in WooCommerce language files, and I've translated the theme and WordPress files using PoEdit with no result (and yes, I cleared the cache) ;) Heeelp
User avatar
Senior Boarder

GK User
Mon Dec 22, 2014 1:50 am
For example search
search.png

code you will find here: \wp-content\themes\StoreBox\searchform.php


Code: Select all
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
   <label for="s"><?php _e( 'Search', GKTPLNAME ); ?></label>
   <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', GKTPLNAME ); ?>" value="<?php echo wp_kses(get_search_query(), null); ?>" />
   
   <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', GKTPLNAME ); ?>" />
</form>


So maybe try there.
User avatar
Platinum Boarder

GK User
Mon Dec 22, 2014 10:44 am
Hi,
"Read more" may be also from GK News Show Pro plugin, so you should also translate this plugin, generally could you provide direct URLs to the pages with these phrases? Then we'll be able to help you with that.
User avatar
Moderator

GK User
Mon Dec 22, 2014 12:32 pm
User avatar
Senior Boarder

GK User
Mon Dec 22, 2014 12:46 pm
P.S. I translated the "Read more" in .../gavern/widgets.nsp.php but nothing happened.

P.P.S. I managed to translate "Search". Tnx Oscar E
User avatar
Senior Boarder

GK User
Tue Dec 23, 2014 8:33 am
This Read More is from Storebox/content.php file, please make sure that you've added translation of this phrase:
Code: Select all
<a href="<?php echo get_permalink(get_the_ID()); ?>" class="btn"><?php _e('Read more', GKTPLNAME); ?></a>
User avatar
Moderator

GK User
Sat Jan 03, 2015 6:59 pm
Tnx. Now the only ones left are "Newer posts" and "Older posts"
User avatar
Senior Boarder

GK User
Mon Jan 05, 2015 10:52 am
Zrno wrote:Tnx. Now the only ones left are "Newer posts" and "Older posts"

Please check StoreBox/gavern/helpers/helpers.layout.fragment.php file and gk_content_nav function (line 336).
Here are these texts and are also added into Storebox.pot langauge file.
User avatar
Moderator

GK User
Mon Jan 05, 2015 4:01 pm
It works. Tnx
User avatar
Senior Boarder

GK User
Wed Jan 28, 2015 8:46 am
Hello. I had the same problem. I've translated with poedit, uploaded .mo and .po files to wp-content/themes/StoreBox/languages but didn't get any changes on the language. Tried the codestyling localization plugin and it gave me two differents .mo and .po files in the same directory (with poedit I had StoreBox-es_ES .po and .mo files and with codestyling localization had es_ES .po and .mo files. Those 4 files left in the same directory (wp-content/themes/StoreBox/languages) and still without changes. After surrender, thanks to this post I've decided translated the strings directly on php files but still don't know how to make it work translating via .mo and .po files. The same problem was found on some other themes, like news2. On the other hand, Steakhouse was easy to translate.
Is it my bad or there are problems with translation files?.
User avatar
Fresh Boarder

GK User
Wed Jan 28, 2015 10:57 am
Hi,

It depends, if you are using codestyling plugin, you should put your po,mo files into wp-content/languages/themes directory, if you are using only poedit and manually create po/mo files, you should put them into wp-content/themes/language/StoreBox directory, could you send me a PM with FTP access to your website with this issue? Then I'll be able to check it exactly.
User avatar
Moderator

GK User
Fri Jan 30, 2015 2:30 pm
If you are using Child theme, please copy your es_ES.mo and es_ES.po files into StoreBox-child/languages directory.
User avatar
Moderator


cron