History: i18n Admin
Comparing version 34 with version 55
@@ -Lines: 1-7 changed to +Lines: 1-5 @@
! Internationalization Admin
- This page explains how to administer a Tiki site with all issues relative to languages (
+ This page explains how to administer a Tiki site with all issues relative to languages ((i18n|Internationalization)). To learn how to create a new language, update it, customize the general purpose translation for your specific site, please see: ((Interface translation 2|Internationalization User)) and ((Interface translation)).
- __Related Pages:__
- ((Character encoding)), ((UTF8)) {maketoc} @@ -Lines: 12-26 changed to +Lines: 10-24 @@
|| :: __I18n setup__::
- Default Language
Multilingual Multilingual structures Show pages in user's preferred language Detect browser language Restrict supported languages Quantify change size User Watches Translations Use database for translation Show Babelfish Translation URLs Show Babelfish Translation Logo
+ Default Language | Default language for the whole site.
Multilingual | Enable multilingual features. It is then possible to associate objects of different languages and type in a same set. In a set of translations, there are only object with a language set, and each object has a different language. At the display of such an object, the language will be displayed with the language of the other objects of the set. ((Multilingual structures)) | Uses a single ((structure)) for all languages. Will display the best page possible based on the user's preferences or browser settings. Show pages in user's preferred language | To activate the 'best language' feature.It uses the "best language" (&bl=y) parameter on calls to wiki pages by default Detect browser language | Show page in the language of the browser if the user is not logged in or hasn't chosen any preferred language Restrict supported languages | Allow an admin to select a subset of all languages to be offered to users, not all. Selecting it opens up a multiple selection box, to enable choosing Available languages (See below): Quantify change size | On translation module, an estimate of the change size (in %) is shown User Watches Translations | When subscribed to a page (to receive email notifications of changes), messages are sent also for changes on the other translations of the same page Use database for translation | Enable making a copy of the language.php file for your desired languages on the database, so that a User Interface within Tiki can be used to collaboratively translate the interface among users, or enable using ((Interactive Translation)) Show Babelfish Translation URLs | It shows clicable urls to translate a page to another language through Babelfish website Show Babelfish Translation Logo | Same as before but with logos instead of text
||
@@ -Lines: 37-41 changed to +Lines: 35-39 @@
* In the admin/general panel, you have to set "__Language__" to your site language
* In the admin/general panel, you have to uncheck "__Detect browser language__"
- * In the admin/general panel, you can set "__Default charset for sending mail__". Tiki default is
+ * In the admin/general panel, you can set "__Default charset for sending mail__". Tiki default is UTF-8 but if the default for you language is iso-8859-1 and if you users use mail user agent that are not able to read UTF-8, it is better to set the charset to iso-8858-1. A registered user will always be able to reset this preference.
* In the admin/general panel, you have to set the __date formats__, if you want the language default, copy/paste from the language.php file.
@@ -Lines: 43-47 changed to +Lines: 41-45 @@
* Tip: if you want to speed up you site, it is better to "compile" the templates. Go to the panel admin/system admin and click on "compile" of you language.
* Tip: if you want to save some space on disk, you can delete the directories lang/xx where xx is a language you don't use
- * Tip: if you want to change some strings, you can edit the file lang/xx/language.php. But be careful, you must follow the syntax and you must use and save the file in
+ * Tip: if you want to change some strings, you can edit the file lang/xx/language.php. But be careful, you must follow the syntax and you must use and save the file in UTF-8 encoding. To see your update in action, you must clear the cache tiki build automatically. To do that, go in the panel admin/system admin and click on the "Empty" of templates_c line
It is possible to use the database to store the translated strings instead of the language.php file. See this page for more information @@ -Lines: 51-55 changed to +Lines: 49-53 @@
The content of some objects (page, article) can also be displayed in the same language than the strings if the translations has been done and established.
- !!!To configure a multilingual site
+ !!! To configure a multilingual site
* In the admin/login panel, you have to define the list of languages you want. You have to check "__Reg users can change language__". You can restrict the available languages by setting "__Restrict available languages__"
* In the admin/general panel, you have to set the default __language __for the site, it is the language, the anonymous visitor of your site will see. @@ -Lines: 57-61 changed to +Lines: 55-61 @@
* In the admin/features panel, you have to check "__User Preferences Screen__"
- !!!To have a multilingual content
+ !!! To make a multilingual menu
*((Multilingual Menu)) !!!To have a multilingual content
* In the admin/features, you have to check "__Multilingual__". This will give the user the possibility to set the language of a Wiki page or an article and to build a set of translations (he would be able to say that this page/article is the translation of this page/article). Each user who has the right to edit a page/article can set the language and links it to the other translations.
@@ -Lines: 71-98 changed to +Lines: 71-81 @@
For each language with a linguistic variant (ex: en-uk), the root language is added (ex: en) to the list (just after the variant)
- !!!Best language
*In the Articles Home page and in the plugin Articles, if an article belongs to a set of translations only the article with the best language will be displayed. *If the parameter bl or best_lang is given to tiki-index.php and if the page belongs to a set of translations, the page in the best language will be automatically displayed. *If the feature "__ The option best language means that the page that will be displayed is driven by your language user preferences. So if your language is Spanish, then when navigating from page to page , each time a page in Spanish exists in the set of translation, this page will be displayed. The Best language feature is mainly used in an open multilingual site as tikiwiki.org. The pages are not translated in order. The translators don't have to change the links to the translated page. Their job is easier and it avoids to have a lot of bad links during a translation phase. For an operational multilingual site, the links must be adapted and the feature desactivated.
+ !!! Best language
((Best language))
!!!Force the strings to be in the same language than a page (tw>=3.0)
Use the option Page language forces to display strings in the same language to do that. (Can be backport in tw 2.x: svn revision 14114) !!!Modules displayed only for some language
-
* lang[]=en&lang[]=fr * lang=fr&max=2 The module will be displayed only if the current language is in lang !!! You can use the previous feature (m * set your menu option name in admin-> menu in English * set the user module title in the admin -> modules panel in English * add in lang/your_language/language.php, the list on translations
+ *((Multilingual Module))
!!!Tip @@ -Lines: 101-111 changed to +Lines: 84-94 @@
!! Goodies
Tiki also has some goodies that can help in a multilingual site:
- *
*
+ * ((Module switch_lang)) that enables a user or an anonymous to switch language.
* ((Module switch_lang2)) that enables a user or an anonymous to switch language. This module can be easily used to switch from a page in a language to its translation.
* a wiki plugin ((pluginVersions)) more generic can be used for language switch
* a wiki plugin ((pluginLang)) to display a text only if the language matches * a wiki plugin ((pluginTranslated)) to display a link only if the language matches * a smarty modifier ((smartyTranslation)) to display a text only if the language matches
- * In
, you can add an additional parameter to the url switchLang=<langName>, where langName is the 2 language letters code (+ eventually - 2 country letters code). This parameter switches the language (for a logged user, it changes his preference - for an anonymous, it remembers the language in a session variable). Example: tiki-index.php?page=Internationalization&switchLang=fr
+ * In 2.
, you can add an additional parameter to the url switchLang=<langName>, where langName is the 2 language letters code (+ eventually - 2 country letters code). This parameter switches the language (for a logged user, it changes his preference - for an anonymous, it remembers the language in a session variable). Example: tiki-index.php?page=Internationalization&switchLang=fr or tiki-register.php?switchLang=fr !! Calendar first day @@ -Lines: 117-121 changed to +Lines: 100-104 @@
!!Where to find a language file
- All the language.php files are delivered with Tiki.
+ All the language.php files are delivered with Tiki. Just look for the files at: ''/lang/xx/language.php'' where xx is a 2-letter or 4-letter language code
!!FAQ @@ -Lines: 127-131 changed to +Lines: 110-114 @@
In 1.7.2, Tiki supplies a limited mb_substr if this function doesn't exist . Some calls have been changed from substr to mb_substr - no functions are provided for the other string functions.
- An interesting article about database in
+ An interesting article about database in UTF-8 on tikiwiki.org: [http://tikiwiki.org/UTF-8]
!!Right to Left Language @@ -Lines: 142-146 changed to +Lines: 125-129 @@
***~np~{tr}You will send {$nb} emails{/tr}~/np~. In the language file, you will find "You will send{\$nb} emails"=>"Vous recevrez {\$nb} emails"
***if you know that a string will be translated later via a variable, please add the comment {*get_strings ~np~{tr}string{/tr}~/np~ *} to have the string added to the language file. (__tiki1.9__)
- ** Please enclose your ~np~{tr} into double quote to ease the translation with language using simple quote
+ ** Please enclose your ~np~{tr}~/np~ into double quote to ease the translation with language using simple quote
*In PHP, the strings are the parameter of the function tra
** the string can contain php variable @@ -Lines: 153-159 changed to +Lines: 136-150 @@
# In a prefilter: it means when the Smarty cache is built. It means that the translation is not done each time you access a template but only once.
# In a plugin : The string with variable or not find by the prefilter function is look again each time the template is accessed.
+
+ !! Linguistic variance + For each language with a variant (ex: en-uk), the root language is added (ex: en) to the list (just after the variant) + -=Related pages=-
- * ((Internationalization (
* * ((
+ * ((i18n|Internationalization))
* ((Interface translation 2|Internationalization User)) * ((Interface translation)) * ((Character encoding)) * ((UTF8)) |