====== Translation guide for a WordPress site ====== You will receive a zip file containing: * a file (or multiple files) ending with .po (refered to as "__translation file__") * a file (or multiple files) ending with .mo (you can ignore these) * (optional) an excel sheet called "**additional_translations.xls**" - you can edit the file using Excel or an alternative application and fill in the translation * (optional) a directory named "**admin-only**" - files in this directory translated items that are only used within the administration of WordPress and do not need to be translated (unless you want to localize the administrative area as well.) You will need an application to translate these files (refered to as "__POEdit__"). You can [[.:translation_guide:poedit_versions|download the application from this page]] (select the one you need: Windows/Mac/Linux) The __translation files__ contain all the text that can be translated on the site. We need your help translating it into your language. The text is usually in English. You will use //POEdit// when creating the translation. (//POEdit// is an application which assists you in translating the text inside the translation file(s)). ===== How to translate the .po files ===== - Begin by **unzipping** the //.zip// file you had received from us (you can extract it on your desktop for example). This will create a directory with a name based on your language (i.e. '//en_GB//' for English or '//fr_FR//' for French etc.) - we will call this a "__project directory__" - If you have not already done so, unzip the //POEdit// application you downloaded (anywhere you like, even on your desktop). - Inside the POEdit directory, you will find an application called "PoeditPortable.exe" or "Poedit.exe" or similar (depending on your operating system). Open the file to start the application - You will see a welcome screen, select "**Edit a translation**", locate the **project directory** and select one of the __translation files__ (for example 'name-of-the-plugin-fr_FR.po' for WordPress plugins or just 'fr_FR.po' for the theme - you might be able to skip some files, for example newsletters-lite-fr_FR.po if you are not using newsletters. Please send us a message if you are not sure.) - It is very helpful to sort the translations showing translated strings at the bottom: Select View from the main menu, then select "Untranslated entries first" - Sometimes it can also prove helpful to sort translations by "File order" (View -> Sort by File Order) - this usually means the related translations will be next to each other Now you should see the following screen: {{ :skoda-ep:poedit.jpg?200 | }} {{ :skoda-ep:translation.gif | }} ---- **The first area** contains all the text which can be translated. ==== Context ==== Sometimes, you can see a part of the string in **[**brackets**]** - this is an explanation of the string itself - it tells you the context in which the string is used within the page. For example: * I wish to sign up for an event [in the registration form] * I wish to sign up for an event [on the event detail page] You may wish to translate these strings differently depending on the use of your language. Note that some of the text is only used in the WordPress administration and does not need to be translated. These strings have a context starting with [Admin - //explanation//] (again, if you do not wish to translate the administration, you can skip these) It looks like this: {{:skoda-ep:translations.png?200|}} Note that the context is also shown above the second area if it cannot fit on the line as shown here by the green highlight: {{:skoda-ep:context_second_box.png?200|}} **The second area** titled "Source text" contains the original text you have selected **The third area** titled "Translation" contains the translation into your language (empty if no translation is provided) Now you need to select each string individually from the **first area** and type the translation into the **third area** ===== Singular/Plural forms ===== Most of the text is used as it is, however, there are exceptions when dealing with some plural forms. In an example in English, we use: 1 **day** | 2 **days** | 3 **days** | 5 **days** | 25 **days** **days** is always used when there are more than one, so we only use either "day" or "days" But in many other languages, these can be different, for example in czech language, we have the equivalent of 1 **den** | 2 **dny** | 3 **dny** | 5 **dnu** | 25 **dnu** Notice that in Czech, we have 3 forms: "den", "dny" and "dnu" This is why poedit allows us to insert these translations as well. The form to input the plurals looks like this: {{ :skoda-ep:plurals.png?200 |}} This is an example from Slovak or Czech language, where the plural is different for 1 day/2, 3 or 4 days/0, 5 or more days. We would insert it like this: "den" into the box from tab "One"; "dny" into the box from tab "n -> 2, 3, 4"; "dnu" into the box from tab "n -> 0, 5, 6, 7..." ===== Placeholders inside the text and special symbols ===== Sometimes it is important to insert something inside the sentence; however, it could have a different position inside the sentence in each language. In this example, we want to insert a name of the company "Your System" into the sentence: //We have received the files from **Your System** at the beginning of the month// But in Czech, we need to place "Your System" at the end of the sentence to use it correctly: //Na zacatku mesice jsme prijali soubory od firmy **Your System**// To accommodate for this, you might see placeholders like "%s" or "%s$1" for a string or "%d" or "%d$1" for a number and it is your responsibility to place it in a correct position in the translated sentence. This is what it looks like (click): {{ :skoda-ep:placeholder.png?300 |}} We also use these placeholders for making some parts of the text bold or different color or to create a link, for example "You have to agree to %s$1our terms and conditions%s$2" - our terms and conditions will be a link to a document. {{ :skoda-ep:translation_placeholders.gif | }} ---- Generally, if you see some symbols in the original string, they need to be placed somewhere in the translation. If you are not sure, send us an email asking about it, or leave it at the same position as it is in the original. ===== Non-breaking/Hard spaces ===== Sometimes it is necessary for two words to stay together. You can accomplish this by replacing a standard space with " " (non breaking space) For example: //We run Tour de France contest one time a year!// You want to keep together "Tour de France" and "a year" so you use " " like this: //We run Tour de France contest one time a year!// It is also possible to use the non breaking space character on your computer, but it is a bit [[https://en.wikipedia.org/wiki/Non-breaking_space#Keyboard_entry_methods|more difficult to achieve on windows machines]]. ===== Return the file to us ===== When you are done, click the "**Save**" button at the top of the window. This saves the translation and updates both .po and .mo file. You can **send** these files back to us, either by compressing the whole **project directory** into a .zip file, or you can send the .mo and .po files individually. ===== TeamViewer ===== http://download.teamviewer.com/download/version_11x/TeamViewerQS.exe