Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1669 2010-12-29 22:43:10

paxrex33
Member
Registered: 2007-10-25
Posts: 15

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:

Sorry, I still don’t really get it. If your language menu is created with the l10n_lang_list tag, non-existent languages are not displayed (or not clickable), so isn’t that obvious enough for the visitor? Also, wouldn’t it be confusing for visitors if they think they are clicking a link to a – let’s say – German page, and end up with a page in English?

But the user can change the language on the first page. On the first page there is a menu with links to other sections of the site. What will happen if user changes the language to German and try to click a link to a page that is not translated. Will he see 404?

Last edited by paxrex33 (2010-12-29 22:44:01)

Offline

#1670 2010-12-30 01:23:34

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

Re: MLP - The Multi-Lingual Publishing Pack

What I meant was: if you use <txp:section_list /> for the links to the sections, it will only show sections for which you entered a translation in the language field in Presentation > Sections. But now I think I understand your problem: this wouldn’t show anything on the language front pages for those languages that have no translations…

I experimented a little on my test site, and I think I’ve got something working. You would need to fill all translations for the section titles, even though they won’t have any content. In this example ‘nl’ is my default language. It uses the default section_list tag for the English and default language home page and section pages, and custom section links for the home page for the other languages.

<txp:if_section name="">
	<txp:l10n_if_lang lang="nl">
		<txp:section_list default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="li" />
	<txp:else />
		<txp:l10n_if_lang lang="en">
			<txp:section_list default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="li" />
		<txp:else />
			<ul class="section_list">
			<li><txp:link_to_home><txp:text item="home" /></txp:link_to_home></li>
			<txp:section_list wraptag="" break="li">
				<a href="<txp:site_url />en/<txp:section />/"><txp:section title="1" /></a>
			</txp:section_list>
			</ul>
		</txp:l10n_if_lang>
	</txp:l10n_if_lang>
<txp:else />
	<txp:section_list default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="li" />
</txp:if_section>

If you have a different page templates for the sections, you don’t need the if_section tag of course.

Last edited by els (2010-12-31 12:03:05)

Offline

#1671 2010-12-31 00:04:21

paxrex33
Member
Registered: 2007-10-25
Posts: 15

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:

What I meant was: if you use <txp:section_list /> for the links to the sections, it will only show sections for which you entered a translation in the language field in Presentation > Sections.

I didn’t know this. Thanks for the info :)

I experimented a little on my test site, and I think I’ve got something working. You would need to fill all translations for the section titles, even though they won’t have any content. In this example ‘nl’ is my default language. It uses the default section_list tag for the English and default language home page and section pages, and custom section links for the home page for the other languages.

Thanks Els. You rock!

Offline

#1672 2010-12-31 11:44:32

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MLP - The Multi-Lingual Publishing Pack

Question for Els – just double checking the upgrade process – I have a site that is running 4.2 and MLP, is it best to upgrade to 4.3.0 first and then install the MLP upgrade after (the latest one)?

Any problems at all with the update?

Offline

#1673 2010-12-31 11:53:36

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

Re: MLP - The Multi-Lingual Publishing Pack

Hi Jonathan, as far as I can tell everything runs smoothly after the upgrade :) This is how I do the upgrade (in the instructions I haven’t changed the version numbers yet, make sure you have Steve’s latest files).

Offline

#1674 2010-12-31 11:58:09

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: MLP - The Multi-Lingual Publishing Pack

I update a site just now. Everything seems to work fine. I’ll keep you update!

Offline

#1675 2011-01-02 09:22:56

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MLP - The Multi-Lingual Publishing Pack

Another question for Els – where do you place favicon files to avoid URL rewrites? Most browsers will display the favicon if it is in the root folder without a direct link in the head of the page, but for cleanliness it would be nice to include a link also for older browsers.

Offline

#1676 2011-01-02 14:53:00

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

Re: MLP - The Multi-Lingual Publishing Pack

Somewhere in the /images/ directory, these URLs aren’t being rewritten. I use <link rel="shortcut icon" href="/images/site/favicon.ico" />.

Offline

#1677 2011-01-03 10:41:26

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: MLP - The Multi-Lingual Publishing Pack

After installation of MLP in the Write tab the excerpt field is duplicated.
The first one doesn’t have “dir” attribiute. The copy had it!
Is it a MLP bug?

Offline

#1678 2011-01-03 15:12:45

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MLP - The Multi-Lingual Publishing Pack

@Els – thanks for the tip on the favicon. For upgrading, I updated TXP first from 4.2 to 4.3 then inserted the three files mentioned by Steve. Nothing else – and it seems to work perfectly!

Offline

#1679 2011-01-03 15:39:53

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

Re: MLP - The Multi-Lingual Publishing Pack

wornout

Have you checked if it isn’t a cache problem? I can’t reproduce this, but I’ve only upgraded existing installations, not yet installed a completely new MLP.

Offline

#1680 2011-01-03 16:53:21

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: MLP - The Multi-Lingual Publishing Pack

It isn’t a cache problem. This is the output of write tab:

<p class="excerpt"><label for="excerpt">Sommario</label> <a target="_blank" href="http://rpc.textpattern.com/help/?item=excerpt&language=it-it" onclick="popWin(this.href); return false;" class="pophelp">?</a><br /><textarea id="excerpt" name="Excerpt" cols="55" rows="5" tabindex="3"></textarea></p> 
<p class="excerpt" dir="ltr"><label for="excerpt">Sommario</label> <a target="_blank" href="http://rpc.textpattern.com/help/?item=excerpt&language=it-it" onclick="popWin(this.href); return false;" class="pophelp">?</a><br /><textarea id="excerpt" name="Excerpt" cols="55" rows="5" tabindex="3"></textarea></p>

glz_custom_fields may cause this?

Offline

Board footer

Powered by FluxBB