WHOIAM: I'm not a programmer and I don't know english well. Keep in mind this if you go on ;)
THE SCENARIO: I want to make a multilanguage site: english, french and italian so I'm trying to install the i18n module but without complete success. This is what I've done till now, I hope someone can help me :)
WHAT I DID:
1) I installed locale.module from contribs. I patched Drupal (patch -p1 < ./patch ), added tables to database and activated the module.
Then I added two locales ( it, fr) and left the row with def (but I tried a lot of configurations). Then I translated some parts of the interface exporting in a po file. At this point switching the default language, the interface change. All seems to work well so locale.module is installed in the right way
2)i18n.module. I tried both official and CVS version but with a lot of problems. The installation of CVS (it fits better to my needs) is very simple, i just copied i18n.module, i18n,inc and the folder misc in /modules/i18n/ . Then I activated the module and the block for languages. In the box appeared only english so I modified conf.php in this way:
$languages = array("en" => "english", "it" => "italiano", "fr" => "francais");
include 'modules/i18n/i18n.inc';
The last line is used by i18n for URL rewriting.
For using the new tables feature I added these lines in conf.php ancd created the related tables for every languages (also english) in database:
$db_prefix=array (
'default' => '', // The default prefix
);
$db_prefix_i18n = array (
// '**' will be replaced by language code at runtime.
'node' => '**_',
'vocabulary' => '**_',
'term_synonim'=> '**_',
'term_data' => '**_',
);
Finaly I configured the module to translate interface, content, automatic syncronization (EXPERIMENTAL), URL rewriting.
HOW I ADDED CONTENT Create content -> Story -> Then i choose a language from the box and i write the story and submit it. Then I click administer, I change language and I write the translation , submit etc. etc. I do this for the three languages.
THE PATH ROLE. The best way is to put the prefix of the language in the path row, ie. en/node/view/english fr/node/view/french. If you don't write path or use the same prefix languages you can get same error when tried to read ALL the article, instead the preview of the article is well displayed
THE QUESTIONS
1) why interface isn't translated by i18n?
2) which is the best method to insert the content?
3) Someone uses the i18n.module (CVS) for complex site? I need to translate polls, pages, stories, taxonomy.
4) is there a complete howto about i18n?
Thanks to all, Aress
Comments
I am the developer of the con
I am the developer of the contrib locale.module. I do not know if i18n is working with it.
--
Drupal services
My Drupal services
I would guess not
If I were to guess, I would say not.
When logged in, the language choice in the user's profile (locale module based, if I'm not mistaken) overrides the language chosen via the i18n module, resulting in content being translated, but not the interface.
James Addison
http://www.pjsoft.ca
I made some tries with an ano
I made some tries with an anonymous user but the interface is always the same, I don't know maybe I do something wrong:(.
Cheers :)
A simple question
Thanks for your work, it's very useful.
Can I ask you a question? When I add a new locale I find this situation:
Def |__|
Add locale
|__| |__|
Save
What should I write in the box near Def (default?)?
Ciao, Aress
"English", probably. I still
"English", probably. I still have to give that module's UI a polishing.
--
Drupal services
My Drupal services
how to add content
i have done the same steps as you have mentioned here but the part of adding content is not working. i do not get any box as in
Create content -> Story -> Then i choose a language from the box
i dont know which box are you referring to because i do not get any box.
plz help.
Sorry, my english is bad, I i
Sorry, my english is bad, I intended the language block in the sidebar.
Cheers, Aress
thanx
thanx aress but can u tell me something about the db_prefix thing in conf.php, i mean explain me more about it
more info on the db_prefix too, please!
yes, i'm in the same situation, trying to figure out how to switch the content back and forth. i have the locales module installed alright, and the interface translation is working... with the fr.pot files i've imported, many strings are translated, when a user chooses 'french' as their option.
however, i want to have the choice to switch interface language right on the front page, and *not necessarily* all node content, but for the right and left sidebar boxes definitely switch content.
anyway, i'm following this thread too, so replies are welcome. Merci!
-=pj=-
www.nefac.net
I'm not a coder (and my engli
I'm not a coder (and my english is bad) so I don't know if what I say is correct. i18n CVS can translate content in two way: prepending language code to the Path alias (all the pages in the same table but with different path en/page, it/page, fr/page, in this way i18n choose the right page by its path) and with specific tables in the database. The second is better because let you create a real multilanguage site (for example you can translate taxonomy and other).
For using the second method we have to create different table for the different languages. In conf.php I wrote (I read it form i18n CVS readme):
$db_prefix=array (
'default' => '', // The default prefix
);
$db_prefix say to drupal if your table in the database have a prefix, I use no prefix so i put nothing in ''.
But the second array (db_prefix_i18n) is more important
$db_prefix_i18n = array (
// '**' will be replaced by language code at runtime.
'node' => '**_',
'vocabulary' => '**_',
'term_synonim'=> '**_',
'term_data' => '**_',
);
it says to i18n that when it has a request for the node table to search **_node and replace ** with the code language. The table en_node, fr_node (or whatever you want) must have the same field of the table node.
en_vocubulary, fr_vocabulary. etc must have the same field of vocabulary. Etc. etc
In the example above, you can localized the nodes but also taxonomy (or vocabulary). In theory you can localized every tables in drupal but I tried with path without success.
Since my installation seems to work now I summarize what I have done.
Important: don't install the contrib locale it is very useful but doesn't work well with i18n, at least in my experience.
* I modified conf.php in this way:
$languages = array("en" => "english", "it" => "italian", "fr" => "french");
include 'modules/i18n/i18n.inc';
the second line will be used by i18n
* I create a new row, "it", in locales table (in the database) because "it" was not present
* I installed localegettex (it's optional but useful).
* I traslated some part of the interface for testing the localization.
* I Installed i18n CVS, activated it and the block Languages, and configured (Remember the Experimental options)
* I Modified conf.php in this way:
$db_prefix=array (
'default' => '', // The default prefix
);
$db_prefix_i18n = array (
// '**' will be replaced by language code at runtime.
'node' => '**_',
'vocabulary' => '**_',
'term_synonim'=> '**_',
'term_data' => '**_',
);
* I created the "language" table for every language I choosed (it_node, it_term_data,...) using Webmin for Linux
* Finally I created taxonomy and nodes in the language I have choosen. For translation content I switch to the language I wanted using the "language block". If you change the path_alias, will be stored only the latter.
* Issues: I've got two problem. The first is related to the fact that if a user chooses a language in his profile he will not be able to change the language of interface. The second is that when I'm on the home page the link doesn't reflect the language, so if I choose italian and then click on a link on the page I'll go to an english page (default language), this happens only when I'm on the homepage.
Cheers, Mike
P.S. If you want I can send you my database + drupal folder. For looking what I've done
Thank you
thank you. i got it working.
it works only with the cvs version
Hi Mike!!!
"P.S. If you want I can send you my database + drupal folder. For looking what I've done"
Could you please send me your folder to check it out? Thank you in advance.
Files
I put database and drupal's files on my site. You can find them here:
http://www.volalibero.it/test_site_drupal.tar.gz
http://www.volalibero.it/drupal_db.sql.gz
Please tell me when you'll download them.
Cheers, Mike
If you install it username an
If you install it username and password of the administrator are:
Username:Staff
Password:staff
sameproblem!
Hello Mike,
I am doing the localization too, and got some problems. I would appriciate if you send me your database + Drupal folder.
Thanks
Angel
avo@myway.com
You can download them from th
You can download them from the urls posted two or three posts above.
Cheers
Some answers
1) why interface isn't translated by i18n?
Interface is translated by locale module and it works fine, but i18n language overrides locale language when interface translation is enabled.
2) which is the best method to insert the content?
The best -and only for the moment :-( method to insert the content is manually. You enable node synchronization, insert a new node in any language, then translate node for other languages. I don't like it either, but waiting for somebody to contribute a good translation module :-)
3) Someone uses the i18n.module (CVS) for complex site? I need to translate polls, pages, stories, taxonomy.
You can translate anything with i18n -just need to add the right tables to $db_prefix_i18n-. But authomatic synchronization only works for nodes and taxonomy. This means you have to take care of the syncronization manually for any other type of module.
4) is there a complete howto about i18n?
No, there isn't. But I intend to extend the documentation and improve the configuration interface. Only I don't know when because I am very busy right now with other engagements not Drupal related. Maybe next month...
I know the module is not that easy to manage, specially the multi-table-multi-language thing so I intend to elaborate some doc based on the questions I am receiving and the ones I see in the forums.
Regards
https://reyero.net
Thank you
Sorry if I answer only now. Thanks for your clarifications.
Aress
I use it.
Some answers to answers
>Submitted by Jose A Reyero on July 10, 2004 - 12:29.
>>1) why interface isn't translated by i18n?
>Interface is translated by locale module and it works fine, but i18n >language overrides locale language when interface translation is >enabled.
True. That is why
a) you should **not** use the $languages array! There is a patch that will fix the i18n so that it uses the locales table instead.
b) I got only the sessions working. The url rewriting and the cookies did now work for me.
a and b are both in CVS
> 2) which is the best method to insert the content?
>
>The best -and only for the moment Sad method to insert the content is >manually. You enable node synchronization, insert a new node in any >language, then translate node for other languages. I don't like it >either, but waiting for somebody to contribute a good translation >module Smiling
The tabbed based translation is the first step.
A translation queue would be the next step. the 18nn module for CVS adds these tabs
> 3) Someone uses the i18n.module (CVS) for complex site? I need to >translate polls, pages, stories, taxonomy.
I translate a flexinode only site: It ' translates' not only images but also custommande menu's and taxonomy
4) is there a complete howto about i18n?
No. Feel free to open a text-writer though :)
> I know the module is not that easy to manage, specially the
> multi-table-multi-language thing so I intend to elaborate some doc
> based on the questions I am receiving and the ones I see in the
> forums.
It indeed is hard to manage... But, one step at the time.
WE should first get it all *working* for 4.5. only then can we start improving useability. But please, pretty please, if you are a UI guru, make some (photoshop/gimp) mockups and post them to the drupal issues. If you ave good ideas on how the translation interface should look, please add them! they might be very usefull.
And if this solved you problem, would you be so kind to report back that it helped? This will help others whom are looking for the same solution.
[Ber | webschuur.com]