Page parts and multilingual sites?
|
1493 posts
|
I am ONLY curious -- this just occurred to me, and I thought I would see what the hard-core coders would think... Would it be possible to use page.parts to structure a bi- or multilingual site? You wouldn't want to replicate your page/subpage structure, I would guess. You could have your "default" language in the "body" part of the page, then create a "de" or "fr" or "ro" or "nl" or "sv" or whatever, tab with the text in that corresponding language. Then you could set a variable ... somehow :), which would allow you to do something like this in your template:
Does that make any sense? I know Philippe has a big French/English site, but I don't know how it is managed/structured. As I say, this is for NO urgent need. I'm only curious, but others might be interested in the question, too. |
|
651 posts
|
I’ve also been wondering about how we would do this… apart from the technical side, I think there are some questions we should answer regarding the requirements:
Especially the last question….
Things to ponder… ;-) |
|
51 posts
|
I think it would be important to have the language culture in the url for search engine. I like the idea to "fall back" to the default language if the content in the current language is not found. But I think we need a better solution than simply add part with the name of the language. |
|
1493 posts
|
@gido - "But I think we need a better solution than simply add part with the name of the language." Isn't the alternative to replicate an entire site's structure, though? You would have an entire "en" branch and have that all duplicated with a "fr" branch? Hmmm.... Just for interest's sake, this is a Frog site running in French and English. I don't know how it is set up! |
|
651 posts
|
@david - "Just for interest's sake, this is a Frog site running in French and English. I don't know how it is set up!" I think this is a site that simply has it's entire site structure duplicated. When I look at the URL, it looks like they made two hidden pages beneath Home: "en" and "fr". They then probably added language specific pages beneath that... That works, but it is very labor intensive from the content editor's perspective I think. @gido & @david - I think translation can be done in two ways:
When I look at sites like Google's Translate, I see they translate content into the biggest nonsense there is. I personally would never want to automatically translate a page on my site. I feel option 2 is the way to go... assuming you both agree, the next question is: how can we keep it as simple as possible for both content editors and site administrators? Simply duplicating the site structure like I specified in the beginning would be simple enough, but would be prone to errors and labor intensive. For now, I prefer the "part part" idea. However, maybe we shouldn't use page parts but introduce "translation parts" for lack of a better term? |
|
486 posts
|
I think it's a good idea to use Parts as David suggested in conjunction with a language selector in the URL like mvdkleijn suggested. lang=en at the end... |
|
651 posts
|
I'd prefer not using something like "lang=en" at the end since that would mess up our URL structure. I'm going to see if the W3C provides any specs on this... |
|
486 posts
|
though when you use the selector it can be weird too because your page would look like site.com/aboutus/fr for example, but why should the URL say 'aboutus' which is english, instead of the equivalent in french? |
|
51 posts
|
@David, thanks for the link. I'm happy to see that frog can manage a large site. @mvdkleijn - We write a plugin/helper/functionality of some kind which translates a page with the help of for example Google translate or another such site. No, I never intented to translate pages with an automatic system :) I strongly dissuade this practice to you. I'm thinking about multilingual content and frog integration. Actually the best way to do this is to create several "branch" (one for each language) and duplicate the site structure. The problem of using "translation part" is that we can't translate the pages titles or meta-data. |
|
1493 posts
|
gido said: "The problem of using "translation part" is that we can't translate the pages titles or meta-data." That is a very good point... Hmm..... It just seems that duplicating the site structure is quite labour-intensive, and harder work for editors/content providers. Not an easy issue to solve simply, elegantly, easily!! O_o |
|
651 posts
|
@gido - there is no readon why we can't introduce a "translated-title" field into a "translation-part". Anyway, I've looked at several recommendations and standards from the W3C and other sources. In essence, there is no provision for a language selector in the URI. I've come across one example, which when we change that to Frog style would give us:
For the default, french and english versions of that page respectively. This scheme could work for us but that yields another problem... both the dash ('-') and underscore ('_') characters are valid characters in Frog page URLs. To make sure our "language selector" works, we'd have to disallow the use of underscore in page title URLs. I personally don't have a problem with disallowing underscores in Frog page URLs On another point, it turns out that non-ascii characters in URLs are illegal, at least in HTML4. I couldn't find a reference on this particular topic for XHTML but there are almost no changes between HTML4 and XHTML on URLs, so my guess is that it is also illegal for XHTML. This means the URL below would be considered illegal since these characters would have to be escaped. (turn them into things like თ)
What do you guys think? Simply ignore the standard and support it or drop support since it is non-standard? |
|
651 posts
|
the escape character should have been like below but without the spaces:
|
|
18 posts
|
Creating a multilanguage site can easily be done with frog. You can create a kind of homepage where user choose there language and enter you’re website. This can be done under the home page. Then you create the directory/pages for your languages like this:
In your template/layout you can add something like this:
When creating a page with that layout add the following tabs: EN_TranslationUrl, NL_TranslationUrl, FR_TranslationUrl, … In those tabs fill in the url to the translated page. In this way you can use whatever URL you want. It’s a quick work around for the multilanguage site problem. I sometimes use typo3 to create a website and there you can just create a translated version of the content on a certain page… The rest is automatically done for you… I tried to explain everything the best I could (I’m not so good at explaining things), if you don’t understand what I mean, just ask and I will try to explain… |
|
651 posts
|
I just noticed that W3C uses the convention below… I think this would probably work well with Frog and its “parts” system.
The default page (http://www.example.com/somedir/somepage.html) could then simply become a redirect to the default language. What do you guys think about that? |
|
486 posts
|
Can’t we just use mod_rewrite? If someone turns on multilanguage via a setting in admin or whatever, then we can make the first url section after the domain the language indicator. Would that work? |
|
651 posts
|
@ricks – but it would mean that we couldn’t use both at the same time… i.e. if someone goes to
when the multilanguage feature is turned on, in you case, they would (hopefully?) get a 404. I’d actually prefer them getting the site’s default language. I think I’m slowly gaining preference for something like “.nl.html” or “_nl.html” for the language indicator. Though I’ve been talking to Philippe about this and we feel that simply being able to copy-paste (parts of) the entire site structure might be enough? |
|
486 posts
|
Maybe I don’t understand mod_rewrite very well, but how come we can’t just redirect to www.example.com/en/this-is-a-test.html? If the multilanguage feature is turned on, the rewrite rule will be looking for url.com/language/somethingeles. In other words it will look for two slashes. If there’s only one slash in the URL, why can’t it redirect that to the default language? Maybe I’m missing something here, but from first appearances to me it looks like this problem might be solved with a proper regex and rewrite… |
|
541 posts
|
just to answer some old question about the interfaces montreal website structure !! it is really simple you have:
that’s it !! |
|
180 posts
|
philippe, we use this idea. it’s simple. Especially as a structure of linguistic versions can be different. |
|
651 posts
|
now imagine a site with 100 pages and 3 languages… :-) |
|
180 posts
|
300 pages. And what the problem? |
|
1493 posts
|
jMas wrote:
Well, not so much a problem as (potentially) a lot more work. If you could have just one directory tree with a means of auto-detecting language-specific content, that would make site maintenance and page creation much simpler. Wouldn’t it? |
|
651 posts
|
@David – Correct @jMas – It is the combination of 300 pages and 3 language… which mean you would have to create 300 * 3 = 900 pages to create. You could create them manually or fiddle with the DB. At least in this version of Frog. |
|
4 posts
|
i think each language should have its own tree. the root-page in frog this has different advantages:
maybe frog should have a tree-copy/move functionality as it exists for radiant-cms language-redirect: https://svn1.hosted-projects.com/medlar/language_redirect_extension/language_redirect/ what do you think? |
|
18 posts
|
I agree with fpauser. frog should have a tree-copy/move functionality. I would make some task a lot easier and also in the current version of frog, it would help maintain a multiple language site. |