String translations
Some words and sentences are built directly into our website code and aren't editable by our Content Team (e.g. the newsletter signup in the footer has a text string that says, "Sign up for our newsletter!"). These strings need to be edited by a developer in the source code using i18n standards so that WPML can recognize them as strings available for translation. We utilize WPML's String Translation dashboard (WPML > String Translation) to edit the translations because it is easier for our non-technical staff to participate as opposed to using .po/.mo files that get translated offline and uploaded to the website.
Editing existing string translations
- Go to WPML > String Translation
- You can use the domain filter to only display USAHello's strings, choose our theme (hellotheme) or plugin (hello-tools) if desired. You can also just use the search field and paste in part or all of the string you want to translate.
- Once you find the desired string, use the + and pencil icons to add a new translation or update an existing one.
- You can save your translation by hitting the Enter or Tab keys on your keyboard or simply clicking out of the window. The Tab key allows you to switch between languages without having to click.
Note: there are a few strings that are updated in the admin area of Wordpress (e.g. the News Alert link text) that do not show up associated with our theme domain (hellotheme) or plugin domain (hello-tools). They have a separate domain and should all be near the top of the dropdown list beginning with "admin_texts_hello".
More information about string translation can be found in WPML's String Translation documentation
Registering new string translations
If new strings were added to our USAHello theme or plugin (e.g. we built a new feature with default text or changed an existing one) they will need to be registered by WPML so they can be translated. After the code changes are pushed to the production server do the following:
- Go to "WPML → Theme and plugins localization"
- Select our custom theme (Hello Theme) or plugin (Hello Tools) from the domains dropdown list and click to scan it.
- This process will take a few minutes and once it finishes you should see a success message similar to the one below. You will now be able to find the new strings on the WPML String Translation page:
If you're having trouble finding specific strings you can refer to WPML's Finding Strings documentation for further guidance.