Glauner da Silva Pereira
asked 10 years ago

DW Focus theme:
1. Where do I find the words “Authors” and “Search” to translate? They are not in the .po file.
2. Month names appear in English, though I am using a Portuguese version of WD.
 

Glauner da Silva Pereira
replied 10 years ago

Not WD, but WP.

Glauner da Silva Pereira
replied 10 years ago

The word “ago” also fails to be translated through the .po file

Glauner da Silva Pereira
replied 10 years ago

To change locale.php is not effective.

5 Answers
DominicStaff
answered 10 years ago

1.  To translate the “Search” word , you can open the searchform.php file in the folder path “wp-content\themes\dw-focus”.
and to translate the “author” you can open the functions.php file  in the folder path “wp-content\themes\dw-focus”. Find the line 450.
2. To translate the Date, you can open the functions.php file in the folder path “wp-content\themes\dw-focus”. Find the line 287 to line 333.
Hope this helps !

Daniel Silva
answered 10 years ago

Hi Glauner and Dominic, I think these strings should be available for translation in the .po file. Dominic, what do you think?
I’m running a multilanguage site, so I’m implementing this way:

1. In searchform.php I used get_locale() function to set a different String for the search box:
$search_label = ‘Search’;
$my_locale = get_locale();
if(substr($my_locale, 0, 2 ) === “pt”){
$search_label = ‘Pesquisar’;
}
and then using the $search_label in the placeholder=”<?php esc_attr_e($search_label . ‘ &hellip;’, ‘dw_focus’ ); ?>

2. I couldn’t resolve the issue with Dominic clue. I can’t find from where the “August” string is coming for the trending news widget and menus… maybe from wp core… the workaround I did: as I’m using polylang, just configured a different mask/format for the dates: Y.m.d (ex:2014.08.12)… hehe

Hope this helps. Best regards, Daniel

DominicStaff
answered 10 years ago

Awesome ! Thanks for your help Daniel.

Daniel Silva
answered 10 years ago

Same approach for the “View all” label that is hardcoded in \wp-content\themes\dw_focus_1.0.9\inc\mega-menu.php

Daniel Silva
answered 10 years ago

“Site index” in footer.php

Powered by DW Question & Answer Pro