Active
Project:
Localizer
Version:
5.x-1.7
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
18 Feb 2007 at 09:38 UTC
Updated:
22 Feb 2007 at 17:46 UTC
I have 3 different subdomains: en.example.com, de.example.com and el.example.com, for each different language (user interface). These subdomains depend on different databases. I was wondering if with the localizer module it is possible to show content(nodes) in more than one language. If a user understands 2 languages to be able to show content from 2 databases. Is this possible or can be implemented in the future?
Thank you in advance
Comments
Comment #1
Roberto Gerola commentedWith two distinct databases ? It is almost impossible.
> If a user understands 2 languages to be able to show content from 2 databases.
Yes. This feature is already available in Localizer (Multilanguage content support), but can
work only with one database.
Comment #2
palazis commentedThank you for the very fast answer!
Well... Does "almost impossible" mean ONLY if a share a few tables or simply impossible?
I wrote this post mostly because NORMALLY different subdomains have different databases.
And because I saw that localizer has 2 VERY STRONG features:
1) Access different subdomains depending on (User Interface) language and
2) Display nodes depending on (Content) language so that a user can see content in 2 or more languages.
Wouldn't it be perfect if someone could combine those two features?
Thank you
Comment #3
Roberto Gerola commented>Does "almost impossible" mean ONLY if a share a few tables or simply impossible?
The problem is when you compose the SQL to get the list of content.
If the content resides on different database you should read in two database and putting together the results.
You can use two different databases at the same time, it isn't the problem, but
you cannot putting together the results of the same table, I am thinking to node
table, on two different databases.
Or better, it could be possible, but some dedicated modules should be written,
as specialized solution, because also the links on the rendered page should be different,
pointing to the correct subdomain.
Comment #4
palazis commentedThanks...
I think I can understand the problem. And I see it's not so easy to be implemented.
So if in one COMMON database I share the following tables for all subdomains:
'node', 'node_access', 'node_comment_statistics', 'node_counter', 'node_revisions' and 'node_type'
do you think that it can work?
Comment #5
Mojah commentedHi,
What I did was created sub-domains all sharing one database. I have different sub-domains for each language and I let localizer handle all the language switching of content.
Additionally you may use different themes by putting a themes folder in your sites/es.domain.com folder and editing your settings file to load your desired theme.
One could create seperate vocabularies that would display content only on a sub-domain thereby keeping the content seperate to a certain extent.
Comment #6
Roberto Gerola commented>So if in one COMMON database I share the following tables for all subdomains:
>'node', 'node_access', 'node_comment_statistics', 'node_counter', 'node_revisions' and 'node_type'
Yes, I think it could work.
Let me know.
Comment #7
palazis commented>Let me know.
For Roberto: Yes, I think the sharing works so far. I am only not 100% sure if it's better that way...
>What I did was created sub-domains all sharing one database..............
For Mojah: Well, perhaps you're right about that.
My initial approach was to have 3 different subdomains: en.example.com, de.example.com and el.example.com, with 3 different databases for each different language and ONE COMMON database to share only my users (SINGLE SIGN-ON). I thought of this because of the following reasons:
1) Simplicity and better control of my site (e.g. easier backups, restores)
2) Clarity. For example I want my german subdomain with its german database, german sitename, slogan, logo, german user interface (locale) german menus, vocabularies, themes, german rss feeds, german nodes and so on. Different User Interface AND content in each subdomain. Crystal clear.
3) No need for i18n or localizer module. I only need the single sign-on module (to be able to login once) and some LINKS to take me to the other subdomains for example if a german user can also speak english.
4) Why create many sub-domains when having one database??? In that case keep one domain to get it over with. Unless I miss something of course(!)
All that was some time back. But... Now there's a but... I found the last localizer versions very cool. You can change between sub-domains... and you can see content from 2 or more languages if you choose so (multilanguage content support). It would be just perfect if this multilanguage content supported multiple databases too! With my approach I'd need many links (No.3 issue) if I have many "translated" nodes in my site. I mean "translated" nodes are nodes that are sort of copies, not actually having different content. Anyway I'll see, every approach has advantages and disadvantages.
Comment #8
Mojah commentedFrom my understanding having sub-domains for each language has a better feel, as it simulates a domain based home page. It also allows the flexibility to have a different theme run on each sub domain, which can be a great advantage when theming with phptemplate and changing the way content is rendered accross different languages. Also there is Search engine placement to consider, as search engines will probably rate a language specific domain better than a domain with various languages under different paths: eg domain.com/es
So with by using localizer and Drupal's multi-site functionality I can get all the above benefits plus the great i18n features provided by localizer.