Multi-lingual sites with SimpleCaddy

While most of the texts on your site have been translated by you, there are a few points that still need attention.

The SimpleCaddy Details page seems to be one of those points. Since version 2.0.4 the Checkout fields in SimpleCaddy are fully capable of being in a multi-language site environment. Here’s how to get it to work.

The Checkout fields

image

This is what a usual checkout field looks like. The fieldname should always be in either English or in your own language, without spaces, accents or special characters like %^&. The Caption is what will show on your site and that is the one we will now transform into a multi-language description.

To begin, make the description ONE WORD and that word must be ALL CAPS and spaces may be represented by _ (underscore). So the above Email should become something like YOUR_EMAIL.

On your site it will for now show up exactly like that.

Now is the time to translate your description into all used languages. If your first site language is English, you would still need to “translate” the text into English.

The file required for this is located in /administrator/language/en-GB/en-GB.plg_content_simplecaddy.ini.

At the end of this file (scroll down) you will have the space to add your own translations. In the case of the “en-GB” file, you will translate YOUR_EMAIL into “Your email” like this:

YOUR_EMAIL=”Your email”

Save the file and upload it back to your server.

Now the Details page on the frontend of your site will show Your email in the same way you would have typed it in without language support.

Now, let’s imagine you want the same Details page to show up in French.

Go to the /administrator/language/fr-FR/ folder and find fr-FR.plg_content_simplecaddy.ini. Add the same ALL_CAPS variable to the file along with its translation in French.

YOUR_EMAIL=”Votre courriel”

Save the file back on your server and set your site to show in French. Now the Details page will show Votre courriel instead of Your email.

That’s all there is to it.