Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1225 2009-03-24 00:12:24

MoonTrace
New Member
Registered: 2009-03-23
Posts: 4

Re: MLP - The Multi-Lingual Publishing Pack

maded wrote:

….
Add the per-language article tables…
1. Add the Italiano [l10n_txp_it_it] table : Failed
2. Add the English [l10n_txp_en_us] table : Failed
Insert MLP tags into pages : Done
….
I can create them manually?
Where I can find the structure base for the tables?
tnks

The problem is in MySQL setup. Default engine type is set to InnoDB, which does not have fulltext search.
The actual query is in textpattern\lib\l10n_admin_classes.php file, lines 1521-1523.

So the query could be for en-gb:

create table `l10n_txp_en_gb` 
(PRIMARY KEY  (`ID`), KEY `categories_idx` (`Category1`(10),`Category2`(10)), KEY `Posted` (`Posted`), FULLTEXT KEY `searching` (`Title`,`Body`)) 
ENGINE=MyISAM 
select * from `textpattern` where l10n_lang='en_gb'

Offline

#1226 2009-03-24 20:15:48

MoonTrace
New Member
Registered: 2009-03-23
Posts: 4

Re: MLP - The Multi-Lingual Publishing Pack

Hi, I am new to textpattern and MPL. I have couple of questions:

  • How can I translate URLs of sections? I want to have /en/news/ and /cs/novinky/ not /cs/news/.
  • I wish I could have all language links always available, but if there is no rendition for particular language I would like the lang-link to point to a parent section. How to achieve that?

Thanks you!

Offline

#1227 2009-03-24 21:08:13

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

Hi MoonTrace, welcome to Txp and MLP!

How can I translate URLs of sections? I want to have /en/news/ and /cs/novinky/ not /cs/news/.

Unfortunately that is not possible at the moment. See this post by Steve, #009.
If you don’t really need the /section/title URLs, a workaround is to use the /title permanent link mode. I’m only using this workaround myself on one, very simple, site. As soon as you need a multi-level structure, and/or categories, it’s not really an option.

I wish I could have all language links always available, but if there is no rendition for particular language I would like the lang-link to point to a parent section. How to achieve that?

Interesting question! :) It’s not possible ‘out of the box’ as far as I know, but there might be a way to achieve it using smd_if. Right now I don’t have time to look into it, but roughly I’m thinking about not displaying the language link if there is no rendition, and use smd_if to test for the presence of a language in the language list, and if not, add a link to the section page. Something like that…

Last edited by els (2009-03-24 21:10:03)

Offline

#1228 2009-03-24 21:11:14

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote

I’m thinking about not displaying the language link if there is no rendition, and use smd_if to test for the presence of a language link, and if not, add a link to the section page. Something like that…

I thought about it and have done this with txp:variable and smd_if

p.s. Els, did you see my mail? Can you share with last MLP-friendly txp install?

Last edited by the_ghost (2009-03-24 21:13:06)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#1229 2009-03-24 21:14:17

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

the_ghost wrote:

Els, did you see my mail?

Yes, I replied, didn’t you get my mail?

Offline

#1230 2009-03-25 00:54:46

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: MLP - The Multi-Lingual Publishing Pack

maded wrote:

I can create them manually?
Where I can find the structure base for the tables?

The structure should be identical to the main textpattern table. Those steps might of failed due to not having the correct MySQL permissions. Are you able to check weather you’ve got the CREATE permission?

Offline

#1231 2009-03-25 01:02:05

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: MLP - The Multi-Lingual Publishing Pack

MoonTrace wrote:

The problem is in MySQL setup. Default engine type is set to InnoDB, which does not have fulltext search.
The actual query is in textpattern\lib\l10n_admin_classes.php file, lines 1521-1523.

Thanks for that change. I’ve not used to the different engine types so I’ll do some testing and research on the topic before making the change.

Offline

#1232 2009-03-25 01:21:00

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: MLP - The Multi-Lingual Publishing Pack

the_ghost wrote:

Have some problems with moving to another hosting – site doesn’t load at all. Even admin-side doesn’t work…

  1. If i try to run in phpmyadmin sql’s, which are marked “as bad”, in phpmyadmin i get normal output…

Victor,

From the looks of things Txp isn’t connecting to the new database at all. You might want to check your config.php. If the settings are correct then could try disabling MLP manually with this SQL statement UPDATE txp_plugin SET status = 0 WHERE name = 'l10n' in phpMyAdmin and let me know the result.

Also some more info such as the phpinfo() from the old host and the MySQL, Txp and MLP versions are you using would be helpful. Thanks

Offline

#1233 2009-03-25 07:22:14

MoonTrace
New Member
Registered: 2009-03-23
Posts: 4

Re: MLP - The Multi-Lingual Publishing Pack

graeme wrote:

The structure should be identical to the main textpattern table. Those steps might of failed due to not having the correct MySQL permissions. Are you able to check weather you’ve got the CREATE permission?

Thanks for that change. I’ve not used to the different engine types so I’ll do some testing and research on the topic before making the change.

Greame, I would suggest Maded to add textpattern\lib\l10n_admin_classes.php at line 1521 this code (middle line):

$indexes = "(PRIMARY KEY  (`ID`), KEY `categories_idx` (`Category1`(10),`Category2`(10)), KEY `Posted` (`Posted`), FULLTEXT KEY `searching` (`Title`,`Body`))";
indexes .= ' ENGINE=MyISAM';
$sql = "create table `$full_name` $indexes select * from `".PFX."textpattern` where ".L10N_COL_LANG."='$lang'";

But can default engine type be set globally by a client, like setting charset?

Offline

#1234 2009-03-25 07:23:34

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: MLP - The Multi-Lingual Publishing Pack

Something strange happens – now i entered admin-side without errors, but site still looks bad.

I think error could be connected with encodings – switching manually to english version works well… Here is my lang_list form (which calls annoying errors in the top)

Here is strange chars in admin side by this url – http://moskomzem.nichost.ru/textpattern/index.php?event=l10n&tab=plugin&plugin=zem_contact_lang-mlp&prefix=zem_crl

And this is the same part when English is selected as admin language:


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#1235 2009-03-25 15:19:11

MoonTrace
New Member
Registered: 2009-03-23
Posts: 4

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:

Hi MoonTrace, welcome to Txp and MLP!

Unfortunately that is not possible at the moment. See this post by Steve, #009.
If you don’t really need the /section/title URLs, a workaround is to use the /title permanent link mode. I’m only using this workaround myself on one, very simple, site. As soon as you need a multi-level structure, and/or categories, it’s not really an option.
..
Interesting question! :) It’s not possible ‘out of the box’ as far as I know, but there might be a way to achieve it using smd_if. Right now I don’t have time to look into it, but roughly I’m thinking about not displaying the language link if there is no rendition, and use smd_if to test for the presence of a language in the language list, and if not, add a link to the section page. Something like that…

the_ghost wrote:

I thought about it and have done this with txp:variable and smd_if

Hi guys, thank you for quick answer. I will look at it. Pity URLs cannot be translated… :/

Offline

#1236 2009-03-26 23:15:34

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

dl33 wrote:

I am using 4.07.

At the moment I have this inside a l10n:if_lang: (…) which produces this: (but nothing visible)

(..) [SQL (0.00042200088501): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from squawk_l10n_txp_de_de as l10n_txp_de_de where 1=1 and Status >= 4 and Posted <= now() and (now() <= Expires or Expires = 0) and ID IN (127) order by Posted desc limit 0, 10]

If I understand this correctly, the query is looking for article id 127 in your de_de table, and my guess is that it’s not there… Probably caused by the l10n_if_lang tag. Actually I’d think it should look in the textpattern table. I need to think about this a little bit longer I’m afraid.

Could you post the exact code you were using please? Including the if_lang tags?

Last edited by els (2009-03-26 23:32:50)

Offline

Board footer

Powered by FluxBB