# Tagged translation

The multilingual plugin supports tagged translations by the use of `{{!<lang>}}<text>{{--}}` tags. So if you want to write text with an english and a danish version, for instance, you can write: "`{{!en}}English version of text{{--}}{{!da}}Dansk version af tekst{{--}}`" into the input field.

Tagged translation have the advantage of being usable in the sidebar for example. So any editable content (typically the title) of a sidebar item can be translated as well. It even extends to the blog title and subtitle.

Also theme based options like a navigation bar may be used tagged multilingual very easily. For this case you have to manually edit your themes index.tpl and add the Smarty Modifier "|multilingual_lang" to the variables in question per `{$navlink.title|multilingual_lang}`.

Tagged translation for blog entries is also available, but is disabled by default, as it duplicates functionality already present in the plugin. Entry translation is already implemented by use of a database based approach, and you should decide on which approach you prefer when creating entries. Using both approaches at the same time could end up being weird and confusing. The database implemented method uses the entryproperties plugin, which has to be installed first. Using this default method you have to write and save your entry as ever in the default blogs language. Then you can use the same entry, translate its content and title, select the language in the new language select field and save the entry again. This translated entry variant is now saved to the entryproperties database table. In the blogs frontend you can easily switch the translation variant by entry in the entries footer language links. This entry based lang switch has no change inheritance to the general blogs language, like the sidebar languagechooser field has, if not set by option. To get access to the translated entry version in the backend, open the origin lang blog entry in the entry form, select the translated language and hit the button "Select language". This will bring up the translated entry variant. Now you can edit and save this entry in purpose.

Also be aware that tagged translation works by simply stripping out any language blocks that are not the current language. There is no fallback language in this case and means to only allow that much languages for the users to switch in the sidebar, that you already tagged.

For staticpages use its language select field and emit one single staticpage per language! This will be automatically evaluated in the frontend language. This is handled differently to the blog entry approach! Lang 'ALL' field staticpages are shown in any case.

### In summary you have these possibilities with this plugin:

1. Content of input fields per "tag" automatically translated multilingual
2. Make certain content of input fields per "tag" and manually added Smarty modifier multilingual
3. Write blog entries per "tag" multilingual (per default disabled, in favour of)
4. Make blog entries translation available via database and the entryproperties event plugin
5. Non default language Staticpages are independent from this multilingual plugin, but are depending on the blogs language
6. Multilinguale nuggets can be set set independently by another plugin (serendipity_plugin_nugget_multilingual)

Dependencies for:

- (4) - Installed serendipity_event_entryproperties plugin.
- (3) - This means that you should probably disable the Markup plugin: "NL2BR" for entries in general or per entry. Otherwise newlines outside language blocks will be converted to <br /> tags and included.

Please also pay attention to:

> If the "browser language detection" option is enabled in Serendipity, this actually overrides the current language - and the current language is always what Serendipity displays and describes as "default" language. It currently actually relies on the blog editors to have the same setup of their language whenever they edit an article, else it would lead into problems or may loose data.

> As the blogs Admin, better set the "Global Configuration" Blog language and the "Personal Preferences" language to the same language. Further on, do not use the sidebars language selection in the frontend. Elsewise the language cookie set, can lead to unwanted language problems overall.