Skip to content

Internationalization and localization

Andrew Manning edited this page Dec 10, 2015 · 1 revision

Translating help and documentation

Mike Macgirvin answers a translation question:

Help and documentation is a bit different than translating the UI.

In a nutshell we have the documentation files under /doc - you can create a subdirectory 'fr' to contain French translations. If you visit '/help' you will see a widget on the sidebar with a few links. In the main content region we load 'main.bb'. The links on the sidebar point to 'general.bb' , 'members.bb', 'admin.bb', and 'develop.bb'.

If you copy all of these five files to the 'fr' directory and translate the content, your content will automatically appear when the French translation is used. We look for the language specific version first and fall back to English if the appropriate language variant doesn't exist.

It is difficult to change the filenames of these five files - as they are hard-coded. However, once you've created a French content page, you can change the names of any files you reference from within that page to French. (Be aware that accents might be a problem in URLs).

So there are two ways you can go about this. You can translate some or all of the help documentation to French and maintain the original filenames, or with just these five files you can create an entirely different French version of the documentation which bears no resemblance to the English version.

In the first case, if you link to a file called 'help/profiles' and the French version has no file of that name, French members will see the English version. If you change the link to 'help/profils' you will need to have a file by that name as there is no fallback.

The filenames themselves are remapped. So a link 'help/foo' will look for

doc/foo.bb (bbcode)

doc/foo.md (markdown)

doc/foo.html (html)

and use the first one it finds. So you can use whatever markup is most comfortable for you. If the original file is 'doc/profiles.bb' and you create a new version you can do it in markup and call it 'doc/fr/profiles.md' and everything will still work.