5. Multilingual sites

Locked
scrut
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 145
Joined: Tue Oct 11, 2005 3:47 pm

5. Multilingual sites

Post by scrut » Thu Mar 23, 2006 12:11 pm

In a globalized world, most web pages have to be multilingual. If the admin of a web site defines the site to support “en” (english) and “fr” (french), the content should be provided in both languages by the content provider (publisher, editor...).
The CMS should be sensitive to the language tag sent by browser requests - so if a browser which is set to the locale “en” is requesting the welcome page, the CMS automatically returns the english version of the welcome page’s content.
In the editing environment, this could be handled through tabs: one tab per language the editor is allowed to edit. The controls always remain the same. Just if the editor clicks on the “french” tab, the content fields are filled with the french content to be edited.

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: 5. Multilingual sites

Post by Tonie » Thu Mar 23, 2006 12:49 pm

Don't know about browser locale, but Joomfish can now be used for multilingual sites.

ivo.apostolov
I've been banned!
Posts: 1868
Joined: Thu Aug 25, 2005 2:33 pm

Re: 5. Multilingual sites

Post by ivo.apostolov » Sat Mar 25, 2006 9:57 pm

It even allows now publishing translations from the frontend

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: 5. Multilingual sites

Post by Tonie » Sun Mar 26, 2006 12:41 am

Mmm, I should really have a look at Joomfish .....

ngsebastian
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Apr 20, 2006 12:39 am

Re: 5. Multilingual sites

Post by ngsebastian » Thu Apr 20, 2006 11:38 am

I really can't find how to make a multilingual content(News, Newsflash, FAQs) with joomfish. If anybody can help me with that I'd appreciate it very much.

fabius
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Sep 25, 2006 7:58 am
Location: The Pyrenees

Re: 5. Multilingual sites

Post by fabius » Mon Sep 25, 2006 9:32 am

This is not a very busy topic but I don't want to start a new thread unnecessarily.

Multilingual is very important to me. Let me clarify what I mean:
  • Static (front and back-end text -- Joomla core text) will change according to user's preferences (expressed by user's browser locale, cookie, registered users' records and/or by user selecting a preferred language on any page. And stay that way throughout her or his session (that requires a session parameter to define language).
  • The developer's 'core' text (meaning menu items, general notes and instructions) will appear in the same language.
  • The user-variable content (meaning content a multilingual user is calling up from the database) may appear in other languages and there may be two or more of these. Users must be able to write or paste two or more languages in HTML form fields.
  • Languages include Chinese, Arabic, etc.
In other words, my definition is "multilingual sites" but also includes "multilingual users". It may sound improbable that users might want to work in different languages on the same keyboard. But there are millions of such machines, combining Arabic with French and English, Chinese, Pashtun, with other languages, etc. Probably two billion people speak more than one language.

I understand that to handle this fully we need:

Stable Joomla 1.5
UTF-8 coding
My SQL 4.1.2 and above (implementing UTF-8 and right-to-left language options, etc)
php 6.0 - not yet released (although some work-arounds are available with 4.1 and 5)

I understand that JoomFish helps to manage the process of translating Joomla core text and developers' core text and that it also contains modules for user language selection and display. But I am not sure what else it does. Perhaps someone could expand the definition on the JoomFish pages.

REQUESTS
If I am posting in the wrong thread, tell me where to go.
Anyone interested: are the above conclusions correct?
Is this the best approach?
Any feedback on php 6?
on mbstring and iconv?

fabius

User avatar
pollen8
Joomla! Explorer
Joomla! Explorer
Posts: 350
Joined: Wed Aug 17, 2005 10:32 pm
Location: la Rochelle - France
Contact:

Re: 5. Multilingual sites

Post by pollen8 » Mon Oct 02, 2006 8:56 pm

could you explain why you think you need php 6 to achieve what you are after?

In Joomfish - you can translate content, modules, and any third party component which provides for Joomfish integration. Translation are written within the Joomfish component.

HTH
Rob
aka

fabius
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Sep 25, 2006 7:58 am
Location: The Pyrenees

Re: 5. Multilingual sites

Post by fabius » Mon Oct 02, 2006 11:55 pm

pollen8 wrote: could you explain why you think you need php 6 to achieve what you are after?
Hi,
I was quoting from
http://help.joomla.org/content/view/1641/62/

"PHP 6 will be fully Unicode and utf-8 aware"

fabius

User avatar
pollen8
Joomla! Explorer
Joomla! Explorer
Posts: 350
Joined: Wed Aug 17, 2005 10:32 pm
Location: la Rochelle - France
Contact:

Re: 5. Multilingual sites

Post by pollen8 » Tue Oct 03, 2006 5:47 am

I believe that's only for 1.0.x -
The problem lies with the fact that until PHP 6 is released, there is no comprehensive native UTF-8 support in PHP. There is a multi-byte extension named ‘mbstring’ which exists from version 4.1 but it is not loaded by default. In addition is also serves other multi-byte encodings such as some Far Eastern languages. This means that it may be present but not set to the correct settings for UTF-8. An additional extension named ‘iconv’, which has some parallel capability, is present in PHP 5 but optional and missing some functions in PHP 4.

Here again, the core team decided to vote for full backward compatibility and for the solution to be transparent to the user. The solution is a combination of either using PHP provided functions, if they are present, or using a special library of UTF-8 aware string functions, if no PHP native functions are available. This provides the best performance (PHP functions available) together will complete backward compatibility. A Joomla String Class provides this functionality and it will be included in the API for third party developers.
from:

http://dev.joomla.org/component/option, ... d,33/p,16/
aka

fabius
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Sep 25, 2006 7:58 am
Location: The Pyrenees

Re: 5. Multilingual sites

Post by fabius » Tue Oct 03, 2006 8:22 am

Thanks for pointing this out. I have never used Joomla or Mambo (my previous web dev environment was Cold Fusion) so I am unsure what your quote means in practice.

Do you think I will be able to develop a site where there will be considerable extra code written by me, including string handling of user input, and extensive interaction among multi-lingual site users in two or three languages (including RTL and CJK)? Users must be able to write and post strings in a mixture of languages without resorting to html entities (as per the Arabic forum) because many international open-definition groups deprecate html in favour of UTF-8 and xml.

The poor quality of Unicode fonts is a separate problem that may have a bearing.

What I am trying to suggest is that this is going beyond localisation (stored translations of core and developer content) and is not a multi-lingual site (text in user's preferred language). [Perhaps these terms should be defined in the Joomla glossary?]

For example, at this stage I do not know if a table field can handle a mixture of RTL and LTR languages or if indexing will be a problem. The answers will affect the table structure and perhaps determine the viability of the project. Of course these are database concerns but it would nice to know if 1.5 handles things like switching string alignment or font according to language, etc.

If you read this far, thanks!

fabius

User avatar
pollen8
Joomla! Explorer
Joomla! Explorer
Posts: 350
Joined: Wed Aug 17, 2005 10:32 pm
Location: la Rochelle - France
Contact:

Re: 5. Multilingual sites

Post by pollen8 » Tue Oct 03, 2006 9:04 am

hi

I'm probably not the best to answer your questions since I work with French and English only (ie not RTL).

However my understanding is the Joomla 1.5 will allow for unicode without php6 (I think the rquirement is php4).

They have written a library to deal with unicode text. Joomla checks if you're version of php has native unicode handling (eg php6 or another version of php with the correct extensions installed).

The native Joomla lanaguage handling deals with the text that Joomla uses and not the sites content. Eg admin menus, login messages woiuld be translated, but content articles would not.

To translate these content articles you would need to install Joomfish. This component maps any translation you make from its own database tables. A single table field would not handle rtl and ltr text, but joomfish is not designed to work this way anyway. If you're writing specific components for joomla then I can't see why you can't integrate joomfish into your component. Basically you need to provide an xml file for each table that you component uses. This creates the admin translation interface for your component in Joomfish.
For the 'display' part you pass your text via the joomfish translator.

An example site is http://www.emadin.com - the shop component hooks into Joomfish
aka

fabius
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Sep 25, 2006 7:58 am
Location: The Pyrenees

Re: 5. Multilingual sites

Post by fabius » Tue Oct 03, 2006 10:00 am

Thanks - good input. I liked the site and the language switch is fast enough.

I don't expect much trouble presenting my content in other languages. But I am not so sure when users start to add their own tables and content in other languages. For example, Japanese or Arab students might want to share and discuss their Hebrew and Aramaic etymons within a work group. Such content does not need translation but has to be stored, retrieved and displayed properly. This kind of thing is not so improbable when you think about it.

If we get there we will have a truly universal online enviroment . . . .

From what you say, I guess Joomfish is not concerned with this but rather with presenting Joomla core text and my text (dev's core) in the site user's preferred language.

User avatar
pollen8
Joomla! Explorer
Joomla! Explorer
Posts: 350
Joined: Wed Aug 17, 2005 10:32 pm
Location: la Rochelle - France
Contact:

Re: 5. Multilingual sites

Post by pollen8 » Tue Oct 03, 2006 11:37 am

From what you say, I guess Joomfish is not concerned with this but rather with presenting Joomla core text and my text (dev's core) in the site user's preferred language.
NO! :D - joomfish is concerned with translating component content. The joomla language manager deals with installing the language files for the admin menus etc.
Such content does not need translation but has to be stored, retrieved and displayed properly
Again I'm not a uft expert :P but isn't that the point of uft, that you have 3bits that represent a specific character - so I'm guessing/stabbing wildy in the dark that you could display an e accute next to an arabic character without problem
aka

fabius
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Sep 25, 2006 7:58 am
Location: The Pyrenees

Re: 5. Multilingual sites

Post by fabius » Tue Oct 03, 2006 6:36 pm

. . . . if user asks to see say a form, we need to localised the layout if they use a RTL language.

We will switch the form fields to the left and the tags/questions to the right and the cursor appears on the right of the first box, etc.

I guess I will have to tweak the code for these things. Luckily we don't have to cater for vertical text  ;)
BTW, does Joomla have an API of its own that could handle that or do I work on the embedded php?

I was very interested in your comment that RTL languages cannot cohabit with LTR in the same DB field. I imagined that would be the case but have not had time to check (don't know mySQL). But I am getting off the subject.

Thanks again.
fabius

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3788
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: 5. Multilingual sites

Post by Hackwar » Wed Oct 04, 2006 12:30 pm

Hey fabius, do yourself a favor and get yourself a SVN copy of Joomla 1.5. Then, when installing it, use some arabic language and see what happens. Its really nice. :) That should answer 95% of all your questions.
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

fabius
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Mon Sep 25, 2006 7:58 am
Location: The Pyrenees

Re: 5. Multilingual sites

Post by fabius » Wed Oct 04, 2006 10:41 pm

Hackwar wrote: Hey fabius, do yourself a favor and get yourself a SVN copy of Joomla 1.5
Thanks - I did that but got stuck in the installation. Busy on other work right now.

ubmongolia
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Tue Apr 11, 2006 1:10 pm

Re: 5. Multilingual sites

Post by ubmongolia » Tue Oct 17, 2006 1:32 am

Hello there,

My site's default language is English. And, I installed Spanish and French language packs. If there is no translation, I want to display only available translations in Spanish and French.


Cheers,

UB Mongolia


Locked

Return to “Wishlist Archives - Archived”