Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#925 2008-09-08 04:29:07
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Re: MLP - The Multi-Lingual Publishing Pack
Hi Steve,
ok – tell me how you think iit can work.
Thanks.
Offline
#926 2008-09-08 05:30:37
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
FireFusion
Ok. Here’s the idea — I haven’t fully tested this so you might want to experiment with it first!
1) Ensure you have the zh-cn and zh-tw Txp language strings installed in the admin interface.
2) Remap all the ‘zh-tw’ strings to a non-standard code like ‘zt-tw’ using a MySQL query…
UPDATE `txp_lang` SET `lang`='zt-tw' WHERE `lang`='zh-tw';
You can use Rob Sable’s rss_admin_db_manager for this or phpMyAdmin — or perhaps Gocom’s new SQL plugin.
3) Edit the l10n_langs.php file and split the Chinese entry from…
'zh'=>array( 'zh'=>'中文(简体)' , 'zh-cn'=>'中文(简体)' , 'zh-tw'=>'中文(國語)' ),
…to something like…
'zh'=>array( 'zh'=>'中文(简体)', 'zh-cn'=>'中文(简体)' ),
'zt'=>array( 'zt'=>'中文(國語)', 'zt-tw'=>'中文(國語)' ),
…and save the file. This will make your copy of the MLP Pack use the ISO-standard ‘zh’ as the language code for 中文(简体) whilst Mapping 中文(國語) to a non-standard ‘zt’.
4) Tell the MLP Pack about your site’s use of this code by adding ‘zh-cn’ and ‘zt-tw’ to the list of your site’s public languages in the Content > MLP > Prefs > Languages
input.
That should be it!
Now the l10n_lang_list
tag will output 中文(简体) => urls with ‘zh’ in them and 中文(國語) => urls with ‘zt’ in them. The only problem will be that you’ll have to re-code the 中文(國語) strings whenever you update them from the txp language server using the SQL from step 1.
Last edited by net-carver (2008-09-08 05:34:48)
— Steve
Offline
#927 2008-09-08 05:39:32
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
FireFusion
Another thing to test — if you use the l10n_get_lang
tag to output the language code in the DocType/header of your pages then you might get non-validating pages for 中文(國語). It will depend on how fussy the validator is about using compliant ISO language codes.
If that’s the case you might need to use some l10n_if_lang
conditionals to output ‘zh-tw’ and ‘zh’ in the 中文(國語) page header and DocTypes.
— Steve
Offline
#928 2008-09-08 08:56:49
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: MLP - The Multi-Lingual Publishing Pack
net-carver wrote:
Nope. That’s the way they work together. Best way to deal with this is from our point of view, would be have the core output titles instead of names for these things — however, if that isn’t going to happen then this will need fixing by one of the other pieces of software involved. When I get time I’ll take a look.
Thank you for the usual helpfulness.
…unfortunately it seems (at least for now) I’ll have to remove one of the two plugins, which will anyway worsen site admin usability :(
Should I find a workaround I’ll post here (really not likely, unfortunately I’m on a hurry so I have little or no time to experiment)
Offline
#929 2008-09-18 14:40:50
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: MLP - The Multi-Lingual Publishing Pack
Hello Steve,
sorry for the continuous requests for help, the fact is I’m trying to transfer a lot of articles from a static site into a txp-multilingual one using php and sql so probably I’ve messed up something.
As I said it could be my fault, anyway I have this problem:
let’s say I have an article in english and I want to clone it in french and italian.
I open the “articles” subtab under the “MLP” tab, find the article I want to translate and check the two checkboxes labeled “french” and “italian”. Two new articles are now correctly added to the “articles” subtab.
The problem arises when I try to edit the newly created articles: I click on the french rendition and I’m brought to the “write” tab > so far so good, the language popup shows correctly “Français”.
Now I click on the italian rendition and the language popup still shows “Français”.
If I change manually the language to “italian” all is working ok, but this is quite annoying because one would expect to have “italian” automatically selected.
Here is another example: if I have 100 articles in english and I clone them all in italian, I then have to change each rendition (located under the column “italian” in the articles subtab) to actually use italian language.
I hope you can understand something even if I fear I was not perfectly clear.
Thank you
Offline
#930 2008-09-18 17:34:23
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
redbot
That shouldn’t be happening. It’s late here now but can you shoot me over a login to that site tomorrow so I can try tracking down the problem. Thank you.
— Steve
Offline
#931 2008-09-18 18:14:04
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: MLP - The Multi-Lingual Publishing Pack
Steve,
first of all thank you again for your quick answer.
I’m sorry but I’m on a local server and I can’t upload to a live one now.
Anyway, if you say that shouldn’t be happening I think it’s probably something caused by me.
More specifically I suspect this can be the cause: as I said I imported a lot of articles using php and sql queries following this route:
1) imported all articles in a specific language (let’s say in italian) to the “textpattern” table
2) copied all the contents of the textpattern table to the “l10n_txp_it_it” table
3) filled all the fields of the “l10n_articles” table (I think here I made a mistake – more on that later)
at this point all my articles are showing under the “articles” subtab in italian but when I try to clone some of them I have the scenario described in my previous post.
Coming back to what is probably my mistake, I filled the field “members” in the “l10n_txp_it_it” table with a rather empirical formula similar to this:
“a:1:{s:5:\“it-it\”;i:$id;}”;
where I suppose “a” is the number of renditions (in this case 1);
“it-it” is the language
$id is the “l10n_group” value for each corresponding article in “textpattern” table
“s” is ???? – I tought at first it was the section but then I found it wasn’t, so I’ve set it to be “5” for all entries.
could it be that this was my error? what the “s” stands for?
Thank you anyway for your help
Offline
#932 2008-09-18 18:42:36
- ploinkr
- Member
- From: Montreal
- Registered: 2007-12-06
- Posts: 83
Re: MLP - The Multi-Lingual Publishing Pack
Hi there,
Textpattern beginner here :-)
Sorry if maybe it’s very obvious but I was wondering how to style the l10n_lang_list menu – is there a specific CSS file for that?
I searched this thread but couldn’t find an answer…
Never mind, I found how to do it: just added a l10n_lang_list
class in my style sheet :-)
Cheers,
Ben P.
Last edited by ploinkr (2008-09-18 19:26:34)
Offline
#933 2008-09-19 13:39:29
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: MLP - The Multi-Lingual Publishing Pack
Steve,
only to simplify my first post,
the problem is whatever rendition I click on “articles” sub-tab the language popup in the “write” tab defaults to the last selected languange.
In other worlds it doesn’t seem to change accordingly to the rendition I’m editing.
Thank you
Last edited by redbot (2008-09-19 14:39:47)
Offline
#934 2008-09-22 09:27:39
Re: MLP - The Multi-Lingual Publishing Pack
I tried the search, but couldn’t find the answer.
Can MLP be used with rss_unlimited_categories to support translations of category names? Currently tags like rss_uc_filedunder
or rss_uc_list
output category names in default language only :(
I realise that there is a different db table for the rss_ plugin, but maybe there is a workaround?
Offline
#935 2008-09-23 16:47:09
Re: MLP - The Multi-Lingual Publishing Pack
hi,
i have installed the pack but cant get it working. Im having problems getting my head around it.
Are there any more documentation/tuts for dummies other than the ones included with the install?
thanks
its a bad hen that wont scratch itself.
photogallery
Offline
#936 2008-09-25 15:00:48
Re: MLP - The Multi-Lingual Publishing Pack
Hello, I’m loving this plugin of yours more and more everyday.
Today I’ve stumble upon the new l10n_permlink tag witch I didn’t understood.
There are some attributes that do not work, that is, independently of how many values I give to those attributes, this tag only returns an address, not a fully functional anchor. It would be very nice to have a tag that would create an anchor element that could return the localized title of the article and an active status class, like this:
<txp:l10n_permlink articleid="2" title="1" active_class="active" />
would return – if active, this:
<a href="bla bla" class="active">Title</a>
Still, it’s a great development, Thanks.
Offline