Which WPML method of string translation should I use?

240 Views Asked by At

I am trying to translate my WordPress website (built using Brooklyn theme) but I do not know which method to use to translate my strings. At first, the strings weren't showing up in the string translation search but then I learned that I had to add more code.

My first question is, do I have to go through every single page and custom CMS entry that I use to update content and wrap everything in code, or is there a way to do that automatically?

Secondly, I use Brooklyn theme but their support team is so slow so I wanted to ask if there was a standard way to find the theme's text-domain to include in the code (if I need it).

Thirdly, I know the options I have with which method to use to translate strings (manual registration or GetText) but I haven't found any explanation relating to where to put this code and how to implement it (even the official documentation gives you the code but doesn't explain what to do with it and I'm not a PHP expert!)

I'm using all the latest versions of WPML and the multilingual CMS.

http://www.expedition-polaris.com

1

There are 1 best solutions below

0
On
  1. Yes, you'll have to wrap all strings that you want translated with one of the localization functions ( https://codex.wordpress.org/L10n ) : __(), _e(), _n(), etc.

  2. If you have already purchased the Brooklyn theme, then grep through the source for either _e( or __(, to find out the text-domain., or if you run the scan function via the String Translations admin page, the text-domain should be listed for the theme.