Translation
Provides a simple API and Tempcode symbol for translating text, via Google Translate. The symbol is designed for assistive translations of user-supplied content, not for wholesale/transparent content translation.
Google Translate will need configuring in the standard Composr config option for this to work:
Admin Zone > Setup > Configuration > Site options > Internationalisation > Google translate API key
To use the symbol just wrap it around text that needs translating in templates, e.g.:
This example translates French in {TEXT} to the site\'s current language, within the context of a block of HTML. The original text is followed by the translated text, and as it is a block of HTML it also includes the "Powered by Google Translate" message.
Here are the available translation modes:
If you omit the source language then it will be autodetected.
Google Translate will need configuring in the standard Composr config option for this to work:
Admin Zone > Setup > Configuration > Site options > Internationalisation > Google translate API key
To use the symbol just wrap it around text that needs translating in templates, e.g.:
Code
{$PROVIDE_WITH_TRANSLATION,{TEXT},{$TRANS_TEXT_CONTEXT_html_block},FR}
Here are the available translation modes:
- {$TRANS_TEXT_CONTEXT_plain} – translate plain text
- {$TRANS_TEXT_CONTEXT_html_block} – translate a block of HTML (with a credit message to Google)
- {$TRANS_TEXT_CONTEXT_html_inline} – translate inline HTML (without a credit message to Google)
If you omit the source language then it will be autodetected.
0 reviews: Unrated
There have been no comments yet