Loading...
 
Multilingual/i18n

Multilingual/i18n


How to build a multilingual site

posts: 4 Germany

Hi,

I don't understand some items on Internationalization+Admin section "How to build a multilingual site?":

"In the admin/login panel, you have to ..." There is no menu item "login" under http://tikiwiki.mydomain.com/tiki-admin.php (Version 1.9.1) . There isn't an item "General" or "Features" either. What do I have to set there?

I also tried to translate a user page and thought if I click on "translation" I could create a new page, which is the translation of the page currently viewed. This seems not to be the case. Instead I can only define that the current page is a translation of another page, which means that I first habe to write the original and the translated page and then define that one is the translation of the other. Do I have to link them bidirectional or is this done automatically?

I didn't yet find out how to create a new page in Tiki. I can only insert a link into an existing page, then click on the "?" behind the link word and then edit the new page. I therefore inserted such a link to "OriginalPageDE" into the "OriginalPage", translated the page from English to German, then declared the German page to be the translation of the English page and then deleted the link from the "OriginalPage". Isn't that somewhat complicated? Isn't there an easier was? Do I really have to create a new page name for every translation, i.e.

...
isn't somthing like this possible:


Regards, Christian

posts: 1092

> Hi,
>
> I don't understand some items on Internationalization+Admin section "How to build a multilingual site?":
>
> "In the admin/login panel, you have to ..." There is no menu item "login" under http://tikiwiki.mydomain.com/tiki-admin.php (Version 1.9.1) . There isn't an item "General" or "Features" either. What do I have to set there?
Click on the admin entry in the menu. You will have a page with a lot of icons. Click on the login one. (it is the same page where you can go on the features page)

>
> I also tried to translate a user page and thought if I click on "translation" I could create a new page, which is the translation of the page currently viewed. This seems not to be the case. Instead I can only define that the current page is a translation of another page, which means that I first habe to write the original and the translated page and then define that one is the translation of the other.
Yes you are right. The translation is aposteriori. It means, you have to create the 2 pages and associate them. The "interactive" interface needs still to be written.

> Do I have to link them bidirectional or is this done automatically?
No, one way is enough
>
> I didn't yet find out how to create a new page in Tiki. I can only insert a link into an existing page, then click on the "?" behind the link word and then edit the new page. I therefore inserted such a link to "OriginalPageDE" into the "OriginalPage", translated the page from English to German, then declared the German page to be the translation of the English page and then deleted the link from the "OriginalPage". Isn't that somewhat complicated? Isn't there an easier was? Do I really have to create a new page name for every translation, i.e.
> * http://.../tiki-index.php?page=OriginalPage
> * http://.../tiki-index.php?page=OriginalPageDE
> * http://.../tiki-index.php?page=OriginalPageFR
> ...
> isn't somthing like this possible:
> * http://.../tiki-index.php?page=OriginalPage&lang=DE ?
You can use the "quick edit" module to create a page directly. or you can type: tiki-editpage.php?page=myPage,de
I know the intercative multilingual interface is missing.

sylvie

posts: 4 Germany

> you can type: tiki-editpage.php?page=myPage,de

Thank you for the hint. I saw that doc.tikiwiki.org is organized that way:

  • Default (English): tiki-index.php?page=My+Page
  • Translation (e.g. German) tiki-index.php?page=My+Page%2Cde


Christian

posts: 4 Germany

And yet another question:

I understood that there is yet another method for translation { tr } ... { /tr }, but I didn't find the documentation. Do you know where I can read more about it?

Christian

posts: 4 Germany

Do I get you right: {tr} is not a Smarty http://smarty.php.net/manual/en/language.builtin.functions.php|Built-in Function], but a Plugin, defined by TikiWiki (though I didn't find, a "*.tr.php" in the tikiwiki directory). {tr} invokes the function tra() in tiki-setup_base.php. This function looks up the English string either in a DB or in some files and returns the translated string. If I want to write my own extensions to TikiWiki, I need my own strings. Am I supposed to add them to the global database or should I override the tra function with "mytra", which first serches my database before searching the global database?

How do I handle complete message sentences like "foo fooo %1 foo foo %2 foo" translates to "bar bar %2 bar bar %1 bar" (mind the position of %1 and %2)?

Christian