Skip to content

Implementing French Translations

How to update content on the French pages using GTranslate

Logging into the GTranslate Interface

To edit the French content of a page, you have 2 options. Start by getting the URL of the page you want to update. Example:
https://investsudbury.ca/fr/why-sudbury/move-to-sudbury/rnip/

Option 1)
To edit that page you can add “https://gtranslate.io/edit/” before the URL. The result is:
https://gtranslate.io/edit/https://investsudbury.ca/fr/why-sudbury/move-to-sudbury/rnip/
You will then be prompted to enter your username and password.

Option 2)
You can also add “?language_edit=1” to the end of the URL. The result is:
https://investsudbury.ca/fr/why-sudbury/move-to-sudbury/rnip/?language_edit=1
This will also prompt you for your password if you’re not already logged in.

Cache

Content is cached for approximately 24 hours. Until the cache is cleared, you will continue to see the old content on the French site. Do not panic or think that your updates are not taking effect. The cache is controlled by GTranslate, therefore we don’t have a manual way of clearing the cache. If the update cannot wait till the cache is automatically cleared, we can contact GTranslate and request that the cache be cleared by them.

If you want to verify that your updates have taken effect, adding a temporary querystring to the live URL will allow you to see the updates. I usually use “?clearcache” at the end of the URL. Example:
https://investsudbury.ca/fr/why-sudbury/move-to-sudbury/rnip/?clearcache

Note that this link only works once in the sense that if you update the content again after viewing the page using the temporary querystring, you will have to change the querystring again to see the latest updates. Ex:
https://investsudbury.ca/fr/why-sudbury/move-to-sudbury/rnip/?clearcache2

In other words, once you view a page at a URL, it gets cached for up to 24 hours.

XNUMX

When editing the French content, you will sometimes see XNUMX where a number should be. This is done so that if the number is ever updated on the English page, it will be automatically update on the French page too without the need to edit the French page. However, if you replace XNUMX with the actual number on the French page, the next time the number is updated on the English page, you’ll have to manually update the number on the French page too.