Composr Tutorial: Translating Composr content
Written by Chris Graham (ocProducts)Composr can have its content translated and delivered for each language, without requiring any duplication. i.e. it can be fully multilingual.
This is a very advanced feature that only a very small proportion of users will want. It is intended for large websites produced by tightly-managed sites that have an active team of human translators.
You may want to consult with a programmer to enable the functionality.
Composr's multi-language support is available when all the following conditions are met:
- you have more than one language installed
- you have the Conversr "Enable regionalisation" option enabled
- you either installed initially with multi-language support on, or you have run the Commandr command to enable it
Pros and ConsPros:
- Support your content in multiple languages from a single website and content repository
- Requires active translator(s)
- Makes development more complex, the translate table must be used for all content strings
- Makes hand-editing the database much harder
- May slow website searching
- All sites on a Composr multi-site-network must have the same multi-lang-content status (i.e. all have it, or all not have it).
In short: Use it if you need it, and prepare for the extra cost and complexity. It's an ideal feature for those that need it.
Commandr commandA special Commandr command is required to set up the database structure.
The Commandr command may take some time to run. It is advised you therefore run the SSH version of Commandr, rather than the webapp (slow webapp requests may stall or be cancelled via various levels of timeout).
Log into SSH on your server (or equivalent process to receive a command prompt) and type:
Then the Commandr command required is:
Depending on the size of your database, the command could take hours to run. You can monitor it progress through tables via MySQL (SHOW FULL PROCESSLIST).
Language choice for CMS actionsTo understand what the content translation can do, and how it works, we need to consider the following cases:
- Sending newsletters
- Editing theme images
- Editing Comcode pages
- Using the Zone Editor
- Content translation (described in the next section)
For '1' (newsletters), you will get a choice what language to send it for when you go to the newsletter module. Subscribers choose their language when they sign up.
Similarly, for '2'-'4', you will get a choice of language which to edit under when you go to the respective section of Composr. What you save will be saved accordingly.
You will notice when you choose your language you will temporarily see the website displayed as the language you are working under, until you finish.
E.g. if you are viewing the website in English, and you go to edit a Comcode page and select to edit to in French, the website will be shown in French while you are editing that page.
For example, if you are adding an article in French, make sure you have your current language set to French by checking the Composr site is being shown in French while you are adding that article.
When editing content, the content is always saved against the language you see it in when you are editing – if it has been translated already then the edit will be saved to your selected language, but otherwise it will stay in the original submitted language when saved (i.e. saving will not save it as a translation for the language you are viewing). Never translate from an edit screen: if something is edited (so long as there were actual changes), all translations are automatically marked 'broken', and will be put back into the translation queue (because Composr doesn't know you haven't made other changes beyond just translating).
- if you are editing an article originally added in French, and you are viewing the website in French, it will be edited in French.
- if you are editing an article originally added in French that has not yet been translated to German, and you are viewing the website in German, it will be edited in French.
- if you are editing an article originally added in French that has already been translated to German, and you are viewing the website in German, it will be edited in German, but the French version (and any other's apart from German) will be marked "broken".
Content translation is primarily performed in a special 'Translate content' part of the Admin Zone (Admin Zone > Style > Translate website content).
You will see there is also an option in the footer for opening up a 'Translate content' screen just with language strings (the user content kind) that were included on the page you are viewing. This is a nice feature if the main translation queue is to full to realistically deal with and you just want new content to get translated.
In Composr almost everything (*) can be translated, but obviously you would not want to translate every forum post for a large community (for example). For this reason, Composr saves language with 'priorities', and that of the highest priority will be presented for translation first. For example, the names of zones would be the highest priority, while forum posts would be the lowest.
(*) A few things cannot be translated such as forum names. The reasoning is that you do not want such things translated, but rather you should have a different copy of each forum for each language. This is an exceptional situation, and is only designed like this due to the way forums are used. Other kinds of category may be translated as described above.
Allowing guests to choose language
Please rate this tutorial:
Have a suggestion? Report an issue on the tracker.