Version 11 (modified by Dirk Stöcker, 7 years ago) (diff)

Add example link.

Show translated versions of wiki page


A macro to output a list of translated versions of in current page. The English page should use the wiki name without language code, and translated wiki pages use OriginalWiki/language_code format (language_code follows ISO 639.2 Alpha-2 format). The [[TranslatedPages]] macro generates a list of languages like

to direct to translated versions of wiki pages.

Bugs/Feature Requests

Existing bugs and feature requests for TranslatedPagesMacro are here.

If you have any issues, create a new ticket.

Get the Plugin

See the Trac plugin requirements for instructions on installing setuptools. Setuptools includes the easy_install application which you can use to install the TranslatedPagesMacro:

easy_install TranslatedPagesMacro

You can also obtain the code from the Trac Subversion repository:

svn co

or download [download:translatedpagesmacro zipped source].

See TracPlugins for instructions on building and installing plugins.

You can browse the source in Trac.

This is a link for setuptools to find the SVN download

Upgrading from older version 0.3

The macro enhanced a lot since version 0.3. A major change is the layout of the pages. Version 0.3 hardcoded the format page/<lang>. The new version has <lang>:page as default which is used more ofthen for wikis.

For existing installations using the old schema following settings must be used:

template = {page}/{lang}
regexp = ([a-z]{2})

also the layout of the language specification page changed (more entries required tables style design).


An example of the required language specification page can be found at TranslatedPagesMacro/TracLanguages (note that this wiki installation does not yet display the table heads correctly).

For example, the page WikiStart was translated to Chinese version Zh_CN:WikiStart, Russian version Ru:WikiStart and Spanish version Es:WikiStart. Insert [[TranslatedPages]] to WikiStart will generate the following list:

And in Zh_TW:WikiStart will generate:

Known Issues

Display english page prominently in missing page overview

An example of an actively used installation can be found at

Recent Changes

17181 by stoecker on 2018-05-20 21:56:32
don't fail for unknown language codes
17083 by stoecker on 2018-03-28 18:28:54
fix URL encoding, shortening code
17081 by stoecker on 2018-03-24 22:28:10
unify code, fix HTML escaping


Author: ftofficer
Maintainer: ftofficer
Contributors: dottedmag

Attachments (5)

Download all attachments as: .zip