- This topic has 1 reply, 2 voices, and was last updated 4 years, 5 months ago by developer vwtheme.
-
AuthorPosts
-
October 29, 2019 at 8:50 am #27842Yevgen YerParticipant
I’am truing to make a multilingual website. I am using Polylang plugin for this, but it can’t see the string for translations (sections headers and text from sections) how can i fix it?
October 29, 2019 at 10:56 am #27850developer vwthemeParticipantHi,
The free version of POEdit doesn’t have the “Translate WordPress theme or plugin” functionality, but you can still generate the .po/.mo files used to translate your plugin with these instructions:
Download POEdit
Run POEdit, then go to File > New…
Select the language of your translation strings in the plugin
Go to File > Save and save the file somewhere (recommended to put it in the languages folder inside your plugin)
Click “Extract From Sources”
Click the small “+” button under “Paths” (bottom left corner) and select the main folder of your plugin
Click the “Sources Keywords” tab along the top
Click the small add button (second from the left)
Enter __ (that’s two underscores) then press enter
Click on the small add button again, then enter _e (underscore then e) and press enter
Repeat to add any additional functions you might have used to translate in your plugin, such as esc_html__ (with two underscores at the end)
Click OK
Verify all your strings were found, otherwise go to Catalog > Properties… in the menu and add any additional translation functions (like esc_attr__) in the Sources Keywords tab
Go to File > Save to save your .mo file again
Include the .po and .mo files in your plugin’s languages/ folder or make it available for download somewhere.There are also paid plugins available for language translation.
Thank You.
-
AuthorPosts
- You must be logged in to reply to this topic.