Revision 4 as of 2006-03-27 04:29:53

Clear message

How to Translate Wiki Pages

Firstly, if you're going to do any translation, please join your [ Language Team]. That way, you won't duplicate any existing or current work, and you can all help each other out. Your language team can advise you on how things work in Ubuntu, what tools you can use, and where translation is needed most. Smile :-)

Choose your Page

I'll use the UbuntuWomen page as an example. It's a project that is trying to reach women in different communities and cultural groups, and it's looking for translators. It's happy to support you in your translation, and whatever else you want to do in Ubuntu. This is a good choice for translation. In theory, as a member of the Ubuntu community and wiki, you are entitled to edit any page, but in practice, it's polite to ask the group involved if they would like their page(s) translated. UbuntuWomen most definitely do, so we'll start with them.


Your [ Launchpad] login, as well as giving you access an the amazing range of services and information, also works in this Wiki. If you don't yet have a Launchpad account, I strongly recommend you [ get] your Launchpad account, since it's needed for access to the translation project, bug-tracker and much more. Once you have your login ... login. Wink ;-)

User Preferences

You can customize your Launchpad-Wiki account in various useful ways. Take a few minutes to set your User Preferences. One of the things I find most useful, is being able to nominate a number of pages I want always shown at the top of my Wiki pages, for quick access. I suggest you put UbuntuWomen and UbuntuWomenLL in your list.

LL is your [ language code], the ISO-639 international-standard code for your language. It's usually written in lower case (e.g. vi for Vietnamese), but in Wiki page names, it's written in that style, e.g. UbuntuWomenFr for the French translation of the main UbuntuWomen page.

Edit the original page

In order to create a new page, your translation page, you need to create a link to it from an existing page. When translating a Wiki page, you create a link to your translation from the page showing the original text (the text to be translated), usually in a prominent position, at the top of the page, so someone with little English doesn't have to try and read through the whole page to find the translation link.

It is common to have a translation bar across the top of the page, or a language bar down the side. You will notice that the main UbuntuWomen page has a translation bar at the top, just under the title. It is coloured, to attract attention. It is a simple table, to which you can add your language. All you need to do, is add the link to your new translation page.

As I'm writing this page, the translation bar shows only one language, Việt ngữ (Vietnamese). When you click on Edit, that translation bar will look like this:

||<rowbgcolor="#feecd8"> This page in || [wiki:UbuntuWomenVi Việt ngữ] ||

All you need to do is add your pagename, and another two pipe | symbols, e.g. for French:

||<rowbgcolor="#feecd8"> This page in || [wiki:UbuntuWomenVi Việt ngữ] || UbuntuWomenFr ||

(or you can put your language before another, rearrange the bar any way you like).

You can't add the language name yet, not until you've created the page by naming it, opening it and saving it.

Save the original page

This is a good opportunity to talk about page-locks and previewing. You will find that after a set amount of time, the wiki will annoy you by flashing in your browser's status bar something like "Your edit lock will expire in X minutes/seconds!", or even "You edit lock has expired!!!"

If you're going to edit much text, it's much less annoying, and easier all around, if you create the page in your text editor, or other offline tool, then, when you're finished, simply paste it into the wiki interface.

I strongly recommend keeping an offline copy of any significant amount of text you add to a wiki, or to any online content site. Data can be lost, and you don't want to lose your work, due to error, electronic disaster, or because someone else has edited over it. I keep a copy of any wiki pages I edit, in a directory named for that wiki and/or group.

The Preview feature is very useful, because it allows you to find mistakes and fix them before the page is published. It also gives you a chance to experiment with formatting, which is necessary when you are learning how to use a particular wiki, and/or when you are confused, because all the wikis are so similar in formatting, yet they differ in small but frustrating ways. One or two square brackets for links? How do you mark bold text again? Preview lets you try things out, to see if they work.

Your new page

Once you've saved your changes to the original page, click on the question mark next to your language link in the translation bar. The question mark indicates that this page hasn't been created yet.

Your page will open, with your title at the top (UbuntuWomenFr, in our example), and with a number of suggestions. Click on Category Template (the same kind of page as the original) or similar. Templates help you keep your pages consistent, and provide some useful features. Category templates group pages of a certain kind. When translating a wiki page, it's important to choose the same kind of page/template as the page you're translating. Since this is a Category template, we'll make sure our page lists the same kinds of categories as the original UbuntuWomen page.

You'll notice the page starts with:

{{{#format wiki #language en}}}

Change this to show your language code. In our example, we would change it to:

{{{#format wiki #language fr}}}

Make sure all your translated wiki pages have your language code specified at the top. That way, search engines will automatically find your pages for people speaking your language, browsers will automatically show your pages to people who have chosen your language in their preferences, and the wiki will group your page with other pages in your language. If the page doesn't show this header, you should add it. Keeping a copy of your wiki pages helps in this way: you have examples of how to format your page.

Write something in your new page. I put, in my language, "This translation will be created when the original text has been finalized.", because the UbuntuWomen page is still being created. I left the instructions about categories, because I want to come back to that. (I don't know how to comment-out text there yet.)

A good general practice for translated pages, if you don't have time to translate the whole page yet, it to copy the entire original text to the translation page. You can translate it bit by bit, and the information is all there for the reader. This is much better than having part of the text translated there, and the rest of the information still on the original page.

Preview and Save your page

Now your translation page exists, you can improve the appearance of your link on the original page. Go back there and click on Edit. Edit the Translation Bar to create an internal wiki link, of the syntax: [wiki:PageName some text]. In our example, this:

|<rowbgcolor="#feecd8"> This page in || [wiki:UbuntuWomenVi Việt ngữ] || UbuntuWomenFr ||


|<rowbgcolor="#feecd8"> This page in || [wiki:UbuntuWomenVi Việt ngữ] || [wiki:UbuntuWomenFr Français ||

which will simply show Français as the link.

Preview the original page: does it look correct? Save the page.

Your page has been created, and the link from the original page will make sense to your community. Now, you can go back and edit your translation when the original page is finalized, and/or whenever you want to change it.

Maintaining your translation

The great thing about wikis is that they're so easy to edit: anyone can login and input information. Unfortunately, that's also their biggest problem: keeping track of all the changes! To maintain your translation, I recommend:

  • keep a local copy of your pages, and of any contributions you make online that you wouldn't want to type out again ;). Update this copy whenever you change your online copy (simply Select All -> Copy the changed page, then Select All -> Paste over your old copy). You might like to date your local copy, to keep track.

  • subscribe to your pages. When anyone changes a subscribed page, the people who have subscribed to it receive an email, with details (a patch) showing what has changed. This saves you a lot of checking and reading. You can subscribe by:

    • entering that pagename in your User Preferences (the last box on that page: enter one pagename per line).

    • when you're viewing a page, click on the envelope icon, or the link that says Subscribe (it will say Unsubscribe if you've already subscribed to that page).

So at any point, you can add/remove subscribed pages singly or as a list. You can use regex (regular expressions) in this preferences box, e.g. UbuntuWomen/* should subscribe you to all UbuntuWomen pages. However, this would mean a lot of mail: you probably only want to subscribe to pages for which you are taking some responsibility.

For further information about translation, please see the [ Translate Wiki], a central resource for translators. Translators are greatly needed and valued in Open-Source projects. Whatever time you have available, can make a big difference for your language group. We look forward to meeting you. Smile :-)

Clytie — your Translation [wiki:UbuntuWomen/Mentors Mentor]

CategoryUbuntuWomen Categoryi18n