Hello, to change the language of the parent theme, you need to translate the pot file in the languages folder of the theme with poedit. If you want to add custom text, you can add the files of the parent theme in your child theme, then open them in your text editor and add your own texts.
hello again,
in my case, i want the website to be PT_BR which there already exists a po file with the strings translated. can i use that po file?
Hi, yes, if you see mistranslated words, feel free to correct them and if the file is not fully translated feel free to complete it too 🙂
Then, you can them the files to me and I will include them in the theme.
so, how exactly do i change the language?
oceanwp’s zip already contains the language i want with translations. EDIT maybe not, it has PT_BR
ive also added the languages to the child theme through that function:
function my_child_theme_locale() {
load_child_theme_textdomain( ‘ocean’, get_stylesheet_directory() . ‘/languages’ );
}
add_action( ‘after_setup_theme’, ‘my_child_theme_locale’ );
how do you i make the website show translated strings?
i still get english strings, for instance in the search results, when i want to have them im Portuguese.
-
This reply was modified 7 years, 8 months ago by
ricmetal.
Hello, if the words are translated in the po file of your language, if you add your WordPress site in your language, it will replace the English words.
ok, i get. the website still doesn’t show in another language. this might be a problem from another plugin. any one or two steps i can follow to ensure this is not an oceapwp problem?
i’m using es_ES, which comes with oceanwp, and i’m using the oceanwp theme (no childs), and set the website to spanish (assuming it the general es_ES)?
i’d rather try and fix the problem, other that re-making the custom child theme.
-
This reply was modified 7 years, 8 months ago by
ricmetal.
Hello, this is very weird, yes if you select your language in WordPress, the language should work in front end, can you create a pre-purchase ticket on oceanwp.org? I will ask you more information and try to see what is wrong.
sorry, i had to resolve this fast so i reset my wordpress installation and rebuilt the website.
on the plus side i’ll update the pt_PT language for OceanWP in the upcoming time!
thanks for your time!
You’re welcome, let me know if you need more help with this.