Translation: Διαφορά μεταξύ των αναθεωρήσεων

Από Digital Cyprus
Μετάβαση στην πλοήγηση Πήδηση στην αναζήτηση
μΧωρίς σύνοψη επεξεργασίας
(Added example, CSS test)
Γραμμή 9: Γραμμή 9:
* '''<translation/>''' : Closes the previously opened '''translation''' tag.  
* '''<translation/>''' : Closes the previously opened '''translation''' tag.  
* '''<nowiki><!--T:N--></nowiki>''' : This tag is used to segment the text. Segmenting the text is very useful to translate very large pages.
* '''<nowiki><!--T:N--></nowiki>''' : This tag is used to segment the text. Segmenting the text is very useful to translate very large pages.
===Example===
The following example represents a very simple page :
<nowiki><div id=example_page></nowiki><nowiki><languages/></nowiki>
<nowiki><translation></nowiki>
<nowiki><!--T:1--></nowiki>
First paragraph.
<nowiki><!--T:2--></nowiki>
Second paragraph.
<nowiki><!--T:3--></nowiki>
Third paragraph.
<nowiki></translation></nowiki>
<!--T:3-->
Another paragraph.
<nowiki></div></nowiki>
<style>
<nowiki>#</nowiki>example_page {
margin_right=20px;
background_color=red;
}
</style>
In the following text, paragraphs are segmented in three parts. Each segment can be translated because they are inside a <translation> tag. However, the last paragrah cannot be translated.

Αναθεώρηση της 08:59, 18 Ιανουαρίου 2024

Introduction

MediaWiki's translation extension allows users to add translations to pages. This page will cover step by step, how to make a page translatable and how to add translations to the existing page.

How to make a page translatable

By default, newly created pages are not translatable. For these pages to accept translations, we need to add specials HTML tags inside the page :

  • <languages/> : This tag is placed on the first line of the page and tells MediaWiki that this page can be translated.
  • <translation> : This tag tells what part of the text can be translated.
  • <translation/> : Closes the previously opened translation tag.
  • <!--T:N--> : This tag is used to segment the text. Segmenting the text is very useful to translate very large pages.

Example

The following example represents a very simple page :

<div id=example_page><languages/>

<translation>

<!--T:1-->

First paragraph.

<!--T:2-->

Second paragraph.

<!--T:3-->

Third paragraph.

</translation>


Another paragraph.

</div>

<style>

#example_page {

margin_right=20px;

background_color=red;

}

</style>


In the following text, paragraphs are segmented in three parts. Each segment can be translated because they are inside a <translation> tag. However, the last paragrah cannot be translated.