Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#649 2008-03-04 17:36:57

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

AndrijaM:

Take a look at the second message on this page:
http://forum.textpattern.com/viewtopic.php?id=20692&p=62

In the original question, KI wrote:

Is it possible to disable automatic language redirection based on user’s browser language?

In reply, net-carver wrote:

Hello KI and thank you for posting to the thread. That’s a new request to me but I’m struggling to think of a reason that might be useful. Could you explain the problem you are having?

You and KI have a reasonable request. The site owner should be have the option to set a default language. Also, the user should be able to choose their preferred language. I suppose that choice could be saved in a cookie. This makes particular sense for people who are multi-lingual and may prefer to see a site in its native language rather than the language choice set in their browser.

Offline

#650 2008-03-04 17:47:11

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: MLP - The Multi-Lingual Publishing Pack

azw: I propably should have explain better :) I know quite well all the cool things MLP is capable of. I was thinking importing large amount of data with textpattern-table-like exel spreadsheet. I think MLP may be unable to see these imported articles as it itself makes duplicates to it’s own tables during saving articles.

Offline

#651 2008-03-04 18:20:10

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

Hi, Ultramega,
Would you be importing the excel as files? (That’s an option in the Content > Files tab of the backend of Txp.) You’re probably right: A quick test seems to indicate that MLP doesn’t deal with these files. I can see, though, how it could be useful to have renditions or versions of those files in some cases.

Offline

#652 2008-03-04 18:27:50

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: MLP - The Multi-Lingual Publishing Pack

No, no :) I try once again: I would import native language articles in excel spreadsheet :) And then later make translations in TXP. But I’m not sure how MLP can see articles originated this way.

Offline

#653 2008-03-04 19:13:01

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

Oh, I see.

As you probably know, when you create an article in TXP, you’re really filling in a number of different database fields for each article. So you’d have to have those same fields in your excel sheet. I can’t think of any reason why you couldn’t do what you want. It would just mean that you’d have to research into how the renditions are created and stored. There is probably data stored in a few different tables.

I’m not sure about this, but I don’t think you could use an Excel file, unless you’re working with a Windows server, maybe.

To do it, I think you’d want to use a CSV file (a data file that has commas between each data value), which you can create with Excel easily. And then I think you’d have to write a mySQL command to insert that file into the database, probably using PhpMyAdmin or the rss_admin_db_manager.

I’m not an expert on this, but it sounds do-able, and could conceivably save a lot of work.

Have you checked to see if there is a plug-in available to add articles through mySQL commands? It’d be easier to adapt someone else’s work than to start from scratch. Let us know what you find, if anything.

(Please see my next message below for an additonal thought on this.)

Last edited by azw (2008-03-05 21:16:21)

Offline

#654 2008-03-05 08:39:42

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: MLP - The Multi-Lingual Publishing Pack

azw wrote:

You and KI have a reasonable request. The site owner should be have the option to set a default language. Also, the user should be able to choose their preferred language. I suppose that choice could be saved in a cookie. This makes particular sense for people who are multi-lingual and may prefer to see a site in its native language rather than the language choice set in their browser.

Exactly! And this situation makes textpattern not good for building multi-lingual web site where english is not native language. And being that this plugin is the only way to build a multi-lingual web site in textpattern, this is serious disadvantage of txp.

Offline

#655 2008-03-05 21:22:20

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

I was thinking a bit more on my last message, #654.

I’m pretty sure that you (Ultramega) would need to use a php script to do what you want. You’d first have to read the data off the csv file and then run the mySQL commands. This is getting more complicated, but still seems doable and worthwhile if you have many articles to add.

This would be a valuable plug-in. I didn’t see anything like this in the plug-ins, although there are several that do similar things for images.

Offline

#656 2008-03-05 21:49:50

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: MLP - The Multi-Lingual Publishing Pack

I think importing articles is quite possible straight from the excel using programs like Navicat mysql admin, which’s demo version I tested recently a bit. It can link columns and add rows straight from the excel. But when talking about MLP-enabled TXP, there comes the question of creating clonable articles, and maybe some else problems too, I suppose.

But plugin for excel-import would definately be cool.

Offline

#657 2008-03-05 22:18:57

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: MLP - The Multi-Lingual Publishing Pack

AndrijaM wrote:

Exactly! And this situation makes textpattern not good for building multi-lingual web site where english is not native language. And being that this plugin is the only way to build a multi-lingual web site in textpattern, this is serious disadvantage of txp.

Sorry to disagree, but I wouldn’d do such claims about “textpattern not good for building multi-lingual web sites” or that “this is serious disadvantage of txp”.

First, the issue comes from MLP and not from TxP itself. As you, I also think that the request you are asking is a good one: to override browser language settings by setting an option in MLP.
This way, if you know that the most of your visitors speak/read a language, you can set it as the default, no matter what their browser language settings are.

But you have to consider also the disadvantages: people that visit your site and read/speak another language or have other browser language settings will get always the version you forced through an MLP setting. So, in your case, everybody will always get the serbian version.

It seems there isn’t a localized serbian version of Firefox, so I guess people in Serbia downloads the English version and so, their browser is set to “en-us” or “en-gb”.
This is not a problem of TxP, nor a problem of Firefox, nor a problem of MLP. This is how things are supposed to work.
So, the “problem” is located between the keyboard and the computer chair, that is, the “problem” is the user who didn’t spend some minutes configuring their browser preferences.

I think you need a solution “ad hoc”.

  • One could be a new option in MLP, as you suggested. But it depends on the developer or someone who could write that functionality, so you’ve to be patient or think about offering some bucks to someone who may be willing to write the code.
  • Another option could be some kind of rewrite/redirect based on the visitors IP. I think this could be implemented “outside” the MLP, using just the .htaccess. The idea is that your server knows from where the visitor comes and so, with some rewrite/redirect magic, the server returns the page in the right language. You will need an ip-to-country table.
  • Or to release a Serbian version of Firefox with the correct language settings by default. It’s open source, so this may be easier than what you think. Then, you can promote it in your site and in other serbian online communities, so people will adopt that version.
  • Or to write a simple tutorial in your site about how to change the language in browser.
  • And remember that if someone visits your site and changes from one language to another, a cookie is set, so the visitor will navigate the site in the chosen language, in every visit to your site, until the cookie is deleted.

Last edited by maniqui (2008-03-05 22:19:23)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#658 2008-03-05 22:26:05

beztak
Member
From: Czech Republic
Registered: 2005-07-21
Posts: 184
Website

Re: MLP - The Multi-Lingual Publishing Pack

MLP is maybe still young but it’s working. I run TXP with MLP on about 12 sites and it’s super ;)

Offline

#659 2008-03-06 09:33:05

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: MLP - The Multi-Lingual Publishing Pack

@maniqui
Thank you very much for your answer. I didnt said that textpattern is not good for building multi-lingual web sites, in fact I think its great. I said that textpattern not good for building multi-lingual web site where english is not native language, and even then, some people will find it usefull, but in my current situation I need to set up a default language, and thats not possible in mlp.

But you have to consider also the disadvantages: people that visit your site and read/speak another language or have other browser language settings will get always the version you forced through an MLP setting. So, in your case, everybody will always get the serbian version.

In my case this is not the problem, becouse 90% of the people visiting the site will be from Serbia, so the others will have an opsion to switch the language.
Anyway, I thing we all agree that it would be good to have an option, just for a cases like this, to choose the default language.

It seems there isn’t a localized serbian version of Firefox, so I guess people in Serbia downloads the English version and so, their browser is set to “en-us” or “en-gb”.

Yes, but you’ll have to agree that even if there is a localised version of firefox, there will always be some people who for whatever reason have some other version. So, it would be nice to set the default version.

So, the “problem” is located between the keyboard and the computer chair, that is, the “problem” is the user who didn’t spend some minutes configuring their browser preferences.

I know, that’s true, but I was working several years as a computer technician, and my guess is that 50 years from now there will still be many people who just want to install something and start using, without any configuration.

Thank you for solutions you suggested. My only option in this moment is to try some rewrite/redirect based on the visitors IP. Problem is not only with firefox, but also in IE. I’ll see what can I do, and if I find a solution, I’ll let you know.

Thanks again.

Offline

#660 2008-03-06 10:47:01

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: MLP - The Multi-Lingual Publishing Pack

Wow, just wait a second, hold on, you said:

maniqui wrote:

And remember that if someone visits your site and changes from one language to another, a cookie is set, so the visitor will navigate the site in the chosen language, in every visit to your site, until the cookie is deleted.

But that solves my problem!!! If I understand right, I am working on a local server so just to make sure:

So ONLY THE FIRST TIME the visitor visits the site, he will get browser specific language, lets say english, but when he choose serbian then, or any other language, that is being remembered in a cookie, so every next visit will be in that language?

Offline

Board footer

Powered by FluxBB