3

I am helping to build a bilingual website using MLP on TextPattern. It's trivial to put a link to the top level page of another language, but how to put a link to the current page in another language?

Eg. /en/contact should link to /de/kontakt (the same article in another language).

I'm sure there are some variables somewhere that I could put into the template that would be filled with the correct links.

1 Answer 1

1

You can use the <txp:l10n_lang_list /> tag.

According to the plugin help documentation:

On an article list page, this outputs all of the site’s available languages. On individual articles it lists only those languages the article has renditions for.

Remember that section names for URLs aren't translatable by the MLP. So /en/contact will link to /de/contact. On the other hand, URLs for articles are translatable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.