Localization - One instance, many databases?

rated by 0 users
Answered (Verified) This post has 2 verified answers | 5 Replies | 2 Followers

ghettoiam
Not Ranked
10 Posts
Points 155
By: ghettoiam
Posted: Tue, Jun 10 2008 12:45 PM
Is there a way to have one instance of CS running, but dynamically alter the connection string based on the language? I'd like to change databases on the fly so that we only work with localized user generated content, yet only have to build/deploy to one server?
 

Answered (Verified) Verified Answers

Alex Crome
Top 10 Contributor
2,780 Posts
Points 41,105
TelligentSupportTeam
Answered (Verified) By: Alex Crome
Posted: Tue, Jun 10 2008 12:53 PM In reply to

You should be able to do this without havign to maintain multiple databases per language.  You should be able to localise the site by adding additional language packs into the /languages/ direcotry, and you should be able to filter out unwanted languages by using Language Content Filters.

If you want to automatically change the connection string on the fly based on the language of the current user, I'd suggest you'd be facing an uphill struggle, especially in those components that do not come with the soruce code included.  You'll also face enormouse problems with caching as CS would not differentiate on a per language basis.  If you use the Language Content Filters build into CS, you would be able to work around said problems.

 
Answered (Verified)
  • Post Points: 20 |
Alex Crome
Top 10 Contributor
2,780 Posts
Points 41,105
TelligentSupportTeam
Answered (Verified) By: Alex Crome
Posted: Tue, Jun 10 2008 2:31 PM In reply to

You cannot assign languages to individual posts, but you can to specific sections (e.g. forums, blogs).  When you create or edit the blog in the Administration section of Control Panel, there should be a "Default Language" option.  Set this to the language of posts you want that section to contain.

This means that if you have three languages, and for each you want to have three forums

- Announcements
- Feedback
- Chat

you'll have to create one set of forums per language

+ ENGLISH
+-- Announcements
+-- Feedback
+-- Chat
 |
+ GERMAN
+-- Announcements
+-- Feedback
+-- Chat
 |
+ FRENCH
+-- Announcements
+-- Feedback
+-- Chat

Similar will occur for blogs and galleries I believe.

 

For localization of text used in CS, you'll want to look at the English language pack in ~/Languages/en-us, and make a language pack for each language you use.

 
Answered (Verified)
  • Post Points: 20 |

All Replies

Alex Crome
Top 10 Contributor
2,780 Posts
Points 41,105
TelligentSupportTeam
Answered (Verified) By: Alex Crome
Posted: Tue, Jun 10 2008 12:53 PM In reply to

You should be able to do this without havign to maintain multiple databases per language.  You should be able to localise the site by adding additional language packs into the /languages/ direcotry, and you should be able to filter out unwanted languages by using Language Content Filters.

If you want to automatically change the connection string on the fly based on the language of the current user, I'd suggest you'd be facing an uphill struggle, especially in those components that do not come with the soruce code included.  You'll also face enormouse problems with caching as CS would not differentiate on a per language basis.  If you use the Language Content Filters build into CS, you would be able to work around said problems.

 
Answered (Verified)
  • Post Points: 20 |
ghettoiam
Not Ranked
10 Posts
Points 155
By: ghettoiam
Posted: Tue, Jun 10 2008 1:11 PM In reply to
So if a user signs up to the german site, this can be enabled by default in there profile so they'll only see german content? Is all content entered by the user (file / posting / blog) associated with the language they're using automatically? I searched -a lot- for localization, but this was never mentioned. Talk about doing it the hard way. :)
 
  • Post Points: 20 |
Alex Crome
Top 10 Contributor
2,780 Posts
Points 41,105
TelligentSupportTeam
Answered (Verified) By: Alex Crome
Posted: Tue, Jun 10 2008 2:31 PM In reply to

You cannot assign languages to individual posts, but you can to specific sections (e.g. forums, blogs).  When you create or edit the blog in the Administration section of Control Panel, there should be a "Default Language" option.  Set this to the language of posts you want that section to contain.

This means that if you have three languages, and for each you want to have three forums

- Announcements
- Feedback
- Chat

you'll have to create one set of forums per language

+ ENGLISH
+-- Announcements
+-- Feedback
+-- Chat
 |
+ GERMAN
+-- Announcements
+-- Feedback
+-- Chat
 |
+ FRENCH
+-- Announcements
+-- Feedback
+-- Chat

Similar will occur for blogs and galleries I believe.

 

For localization of text used in CS, you'll want to look at the English language pack in ~/Languages/en-us, and make a language pack for each language you use.

 
Answered (Verified)
  • Post Points: 20 |
ghettoiam
Not Ranked
10 Posts
Points 155
By: ghettoiam
Posted: Wed, Jun 11 2008 12:42 PM In reply to

Thank you.  That's -very- helpful.  I

In my languages.xml I have a list of languages that are shown when I select my users default language in their profile. 

 

<

language name="English" key="en-US" />
<language name="Fran‡ais / French" key="fr-FR" />
<language name="Deutsch / German" key="de-DE" />
<language name="Deutsche Schweiz / German (Swiss)" key="de-CH" />
<language name="Ελληνικά / Greek" key="el-GR" />
<language name="简体中文 / Chinese" key="zh-CN" />
<language name="Spanish (Ecuador)" key="es-EC" />
<language name="Spanish (Spain)" key="es-ES" />

 But when I edit a forum and select a language, the list is different.  It's missing languages and has extra ones that I don't even have files for (ie. Italian).

Why is this?  Can I get this forum language selection to reflect my languages.xml?

 
  • Post Points: 5 |
ghettoiam
Not Ranked
10 Posts
Points 155
By: ghettoiam
Posted: Wed, Jun 11 2008 1:46 PM In reply to

Problem found.

communityserver.config and languages.config both have a lists of languages.

In communityserver.config you must add your nodes from languages.config with the appropriate data and add the enabled="true" to the end of it.

So in languages.xml you have:

 

language name="Deutsche Schweiz / German (Swiss)" key="de-CH" />

Which means in communityserver.config you must have:

<

filterLanguage key="de-CH" name="Deutsche Schweiz / German (Swiss)" enabled="true" />

This solves the issues.  All languages not in found in "languages.xml" should be deleted or set to enabled="false"

 
  • Post Points: 5 |
Page 1 of 1 (6 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com