Posted by michel.cote on February 12, 2012 at 12:36pm
Dear all,
I am trying to build a multilanguage site in Openscholar. I would like to know if anybody was successful.
I try to make the language switcher appears on the Scholar site, but it does not work. It does appear in the administrator site. Also, I cannot make the translation tab work when entering a new page.
Any help appreciated.
I am using OpenScholar beta 13.
Michel
Comments
Michel, I included modules
Michel,
I included modules and documentation for setting up multilanguage OpenScholar in the last update, but I haven't worked with any localized sites first hand. You can view our docs here: http://scholar.harvard.edu/help/vsitehelp/os_l10n
Since you have the language switcher working for the admin, I'll assume you've enabled the localization client module. How about OpenScholar Translation - os_l10n? That module isn't strictly necessary, but does provide some useful defaults.
Have you given any users the "use on-page translation" permission?
Still no Language Switcher
Hello jsagotsky. Thanks for the info.
I was able to download the latest "master" version of OpenScholar at https://github.com/openscholar/openscholar/
I had some PHP problems with that version with a lot of "Notice: Undefined index..." and "Strick warning: Non-static ...". I had to turn off all notice reporting in the php.ini (I set error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR), so that I could continue. The site worked, but there was simply too many reporting message with the default setting of error_reporting.
I follow your instructions and I am now about to translate the interface and the content of the pages. It works almost like a normal Drupal installation but I still cannot have the Language Switcher appear in a Scholar Site.
I set the Language Switch block in:
Admin>Site building>Blocks
I tried different regions. It appears in the admin site but not on the Scholar site. Could it be that these regions are not the same as those for the Scholar site?
Michel, Why do you need the
Michel,
Why do you need the language switcher? I'm not familiar with that block.
Here's how I've been letting users choose their language:
* Enable Localization Client and OpenScholar Translation modules
* Add languages to my site (admin/settings/language)
* Set language negotiation to "Path prefix with language fallback" (/admin/settings/language/configure)
* Give authenticated users (or whichever role you prefer) the "use on-page translation" permission
The user then needs to select a language. On the user's site, hover over Hello $username and click "My Account". Then click "edit". At the bottom of that page you should be able to choose the language displayed to the user. When I set this to a non-English language, my user gets the translation bar.
Can you let me know if that works after following all those steps?
If you decide that you still need a block for selecting a language, I suggest you look at the admin page for contexts. It lets you add blocks to certain contexts of the site, including user sites.
Jon
The reason I would like the
The reason I would like the language switcher is because I would like a site where the reader can choose the language to read the content. So, I do not only need the content in a language different than English, but for a lot of the content, I would like to have a English description and a French description.
I did all the steps your indicated and I am able to translate the content. However, I notice that when I translate an "Announcement" and I have both an English and French version of a particular announcement, when I press the Announcement tab in the principal menu, the site display both the English and French version one after the other. I would like it to display only those of a particular language.
I also would like to have the menu translated in different language. To do this, I tried to install the i18n module into the Scholar site but it did not seem to worked.
I like OpenScholar a lot, and I might be able to live with a single language site. But before putting up the site, I am trying to figure out if maintaining a two language site is possible.
Michel
I tried out the langauge
I tried out the langauge block today. It worked for me as long as Language negotiation was included the path prefix.
What I suspect is happening with the announcements is that we still have some untranslated strings left in the code. I'm not sure how Drupal savvy you are, but in order for text to be translatable we have to mark it in code by wrapping it in a translation function. Since we only started working on localization last release, we haven't had a chance to find all the untranslated strings. What I expect is happening is that you have an instance of a translated string followed by an untranslated one rather than the duplicate you describe. I'm not 100% sure on that though and if you send a screenshot I can be certain.
We haven't had a chance to support i18n yet. It's something we're interested in, but not in the immediate future. That said if you try it out and have some success, we'd be grateful if you share your notes on it :-)
Jon