Translation 101
Step By Step[edit | hide | hide all]
- First, go to the page you want to translate. If no "Translate this page" option is available:
- Go to Special:PagePreparation and enter the name of the page you want to translate. Click Publish. It will give you a link to edit the page.
- Go into the Read view of the page and then click "Mark this page for translation." Don't worry about any of the boxes: just scroll all the way to the bottom and finish it.
- In the Read view of the page, click "Translate this page". Switch the language to translate to your desired language: This will be in the gray box on the left.
- Translate away! Clicking on each section will bring up the box to write in the translated version. Remember to copy any formatting over as well: I recommend copy and pasting and then translating from there if it's formatted.
Advanced usage[edit | hide]
Sometimes the automatic process of preparing a page for translation doesn't go too smoothly and some text either doesn't show up in the UI correctly or doesn't show up at all. This is easy to fix through source code editing once you're familiar with the syntax of the translation feature. Below is an explanation of this syntax that will hopefully help you with troubleshooting.
- All the tags and formatting in the following explanation include a dot which can be deleted when actually using the templates.
- Each page that has been marked for translation starts with the two following tags: <languages./> and <translate.> (each on a different line). <translate.> is an opening tag which marks the beginning of the translation and <languages./> is a stand-alone tag that shows the available translations in read view. The closing translation tag (</translate.>) is usually located at the very end of the page. If there are any <translate.> (or </translate.>) tags in the middle of the page, feel free to remove them.
- Translation sections are marked with the <.!--T:n--> tags. The number in these tags changes with each instance and should be in order. These tags can be placed either at the end of a line, marking a one-line section, or on a new line (which also has to be separated from the text above it by a blank line). The sections end where new sections begin (or at the </translate.> tag). The extension will add these automatically so don't add them yourself. However, if you're editing the source page and are removing a line of text with a translation marker, remove that marker as well.
- Example: When deleting the line Example text <.!--T:48-->, don't just delete "Example text." The translation marker should be removed as well.
- Links to other pages should include the Special:MyLanguage syntax. For example, instead of [.[ElMariana]] the link should look like this: [.[Special:MyLanguage/ElMariana|ElMariana]] (without the dots).
Things to Remember[edit | hide]
Please keep the translations as accurate as possible! You can change the sentence structure to sound better when translated, but make sure to keep the meaning consistent.
Remember to copy over all the formatting. If you aren't sure which parts of the text are formatting, feel free to ask for help in our discord.
Troubleshooting[edit | hide]
- Error: Nested translate tags are not allowed. when preparing a page for translation.
- Instead of using the extension page, manually mark the page for translation. Go to the source page and Edit Source Code. Put <.translate> (without the ".") at the beginning of the page and <./translate> at the end (again, without "."). At the top of the page should be a new link that says "Mark this page for translation." Proceed from there.
- Error: Multiple translation unit markers for one translation unit. Make sure that translation units are separated by blank lines.
- It will show you the error. Find this section in the source editing and do one of two things:
- Make sure the translation markers are on two different lines with a blank line separating them.
- Delete one of the translation markers if it is on an empty line
- It will show you the error. Find this section in the source editing and do one of two things:
- Error: Mobile only is showing on desktop or vice versa.
- The <mobileonly and <nomobile> tags have to be used at the beginning and end of every single translation box. They will not transfer between units.
Helpful Links[edit | hide]
https://www.mediawiki.org/wiki/Help:Extension:Translate/Translation_example