2009-11-24 05:46:01

azw
Member
thêta

Re: MLP - The Multi-Lingual Publishing Pack

In earlier versions of TXP and MLP I placed the favicon in the root and used this in my header:

<link rel="shortcut icon" href="/favicon.ico" />

That worked.

With the upgrade to TXP 4.2 and MLP 0.9.13-gp, I have had to change the code to:

<link rel="shortcut icon" href="<txp:site_url />favicon.ico" />

What I don’t understand is how the browser finds the favicon even though the MLP adds a folder to the code when it created the HTML. The code becomes something like:

<link rel="shortcut icon" href="http://www.MyUrl.com/en/favicon.ico" />

How does that work when the favicon is actually in root (http://www.MyUrl.com/favicon.ico)?

Offline

 

2009-12-04 17:02:55

Exiladler
Member
delta
From: somewhere in Europe
Known languages: en, es, de + (some: it, fr, cat)
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi,

I have the following issue, depending on the language used, I’d like to display a Paypal Buy now button on the website. To look really clever, I have created differnt buttons for each language but I domehow fail to grasp how I can display the button depending on the selected language.

Ideally I’d like to embed the button code either in the article or in an article custom field but the html code seems to be too long, any bright ideas?

Offline

 

2009-12-04 17:09:42

Els
Admin
omega
Real name: Els Lepelaars
From: The Netherlands
Known languages: nl, en, (some: de, fr, es, it)
Website

Re: MLP - The Multi-Lingual Publishing Pack

I don’t know much about Paypal buttons, so can you tell me which part of the code should be different depending on the language? Is it just the image name?


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

 

2009-12-04 17:14:40

jpleboeuf
New Member
alpha
Real name: Jean-Philippe Lebœuf
From: Prague, Czech Republic
Known languages: FR, EN, (DE), (CZ)
Website

Re: MLP - The Multi-Lingual Publishing Pack

For example, you can play with l10n_if_lang.

Offline

 

2009-12-04 17:15:47

Exiladler
Member
delta
From: somewhere in Europe
Known languages: en, es, de + (some: it, fr, cat)
Website

Re: MLP - The Multi-Lingual Publishing Pack

Certainly,

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="lc" value="GB" />
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="xxxxxxxx" />
<input type="image" src="https://www.paypal.com/en_US/ES/i/btn/btn_buynowCC_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" border="0" src="https://www.paypal.com/es_ES/i/scr/pixel.gif" width="1" height="1" />
</form>

and if in Spanish, then line 5 of the form should have this image source

https://www.paypal.com/es_ES/ES/i/btn/btn_buynowCC_LG.gif

if possible, the alt text should also be exchanged but I can live without that

Offline

 

2009-12-04 17:30:57

jpleboeuf
New Member
alpha
Real name: Jean-Philippe Lebœuf
From: Prague, Czech Republic
Known languages: FR, EN, (DE), (CZ)
Website

Re: MLP - The Multi-Lingual Publishing Pack

Then play with l10n_get_lang to build your URLs.

Offline

 

2009-12-04 17:34:55

Els
Admin
omega
Real name: Els Lepelaars
From: The Netherlands
Known languages: nl, en, (some: de, fr, es, it)
Website

Re: MLP - The Multi-Lingual Publishing Pack

If you have a lot of languages on the site I think it can be automated further, but if not, it’s probably quickest if you put this code for each language in its own form, name the forms ‘en-us_paypal’, ‘es-es_paypal’ etcetera, and use something like this to call the right form:

<txp:output_form form='<txp:l10n_get_lang type="long" />_paypal' />

(edit: late again ;) )

Last edited by Els (2009-12-04 17:35:18)


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

 

2009-12-04 17:36:59

Els
Admin
omega
Real name: Els Lepelaars
From: The Netherlands
Known languages: nl, en, (some: de, fr, es, it)
Website

Re: MLP - The Multi-Lingual Publishing Pack

jpleboeuf wrote:

Then play with l10n_get_lang to build your URLs.

That’s what I was thinking when I said ‘can be automated further’, but the get_lang tag outputs en-us, and not en_US. But even that could be solved if necessary :)


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

 

2009-12-04 18:38:33

Exiladler
Member
delta
From: somewhere in Europe
Known languages: en, es, de + (some: it, fr, cat)
Website

Re: MLP - The Multi-Lingual Publishing Pack

Thanks, that has given me enough to work it out

Regards
Peter

Offline

 

2009-12-04 23:19:32

datorhaexa
Member
zêta
Real name: Ralitza
From: Düsseldorf, Germany
Known languages: en, de, bg
Website

Re: MLP - The Multi-Lingual Publishing Pack

graeme wrote:

Please file a bug and I’ll fix this when I get a chance. Thanks.

Oops. Missed the posts. I hope someone with an account at txpforge can file this issue so that I don’t make an account for this only.

Last edited by datorhaexa (2009-12-04 23:20:25)

Offline

 

Powered by FluxBB