Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1513 2010-04-25 12:40:33

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

Re: MLP - The Multi-Lingual Publishing Pack

azw wrote:

The main problem I’m aware of is that if you change the list of language codes, you’ll have to edit that every time you do an update, too.

Which list are you referring to, azw? The one in l10n_langs.php? I don’t think it’s necessary to replace that file when doing an MLP upgrade. And you can always ask Graeme to add it to the pack file.

Offline

#1514 2010-04-26 07:49:52

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

Re: MLP - The Multi-Lingual Publishing Pack

Yes, that’s it, and that would be easier for a new language.

The biggest change I made was to edit this line:

'en'=>array( 'en'=>'English' , 'en-gb'=>'English (GB)' , 'en-us'=>'English (US)' ),

to be this:

'en'=>array( 'en'=>'English' , 'en-gb'=>'English (GB)' , 'en-us'=>'English' ),

That’s because when the language name is displayed using MLP, I didn’t want to display the longer form “English (US)”.

Is there a better way to get rid of the “(US)”?

Last edited by azw (2010-04-26 07:50:23)

Offline

#1515 2010-05-12 13:36:30

JayFoxRox
New Member
Registered: 2010-05-12
Posts: 1

Re: MLP - The Multi-Lingual Publishing Pack

Hey, is there any way to have images for the language list without modifying the plugin?
I have small language / flag icons for the languages and would like to have them present on any page. However, the current system only allows me to have a list, hence its impossible (?) to link to another language using an image.
Wouldn’t it be better to be able to add a “lang” attribute to links in general to switch between languages? Meaning <txp:[l10n]page_url lang=“Language here”> would switch the current page to the newly defined language – or is that possible already somehow?

Offline

#1516 2010-05-12 16:24:55

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

Re: MLP - The Multi-Lingual Publishing Pack

Regarding the images, you can probably solve this by CSS. If you definitely would like to use an img tag instead of a CSS background-image, you may have to modify the plugin, or maybe you can do some manual coding trickery using the l10n tags combined with mmmm smd_each?

Regarding the lang attribute, you may try to “recreate” URLs using a combination of built-in txp tags (txp:section, txp:permlink, txp:article_url_title) and/or txp:l10n tags, and hopefully what will meet your needs.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#1517 2010-05-12 19:16:24

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

Re: MLP - The Multi-Lingual Publishing Pack

maniqui wrote:

…combined with mmmm smd_each?

rah_replace?

Offline

#1518 2010-05-18 06:59:07

liniocht
Member
Registered: 2009-10-28
Posts: 45
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi!
How can I prevent MLP from translating the word “category” in URL?

I get categories with URLs like this /ru/%d0%9a%d0%b0%d1%82%d0%b5%d0%b3%d0%be%d1%80%d0%b8%d1%8f/brush-ink/ where “%d0%9a%d0%b0%d1%82%d0%b5%d0%b3%d0%be%d1%80%d0%b8%d1%8f” is translation of the word “category”. I don’t like it I would prefer to keep it “category” for all languages.

Thanks

Offline

#1519 2010-05-18 07:17:41

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

Re: MLP - The Multi-Lingual Publishing Pack

Hi liniocht, the simplest way to do that is go to MLP > snippets and search for the category string, and change the Russian translation to ‘category’. I’m not sure if this string is used elsewhere though… you might not want it in other places.

Offline

#1520 2010-05-18 07:47:13

liniocht
Member
Registered: 2009-10-28
Posts: 45
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi Els, thanks for quick reply.
I thought of that but it seemed to me not a good practice, cause translation takes place anyway. I thought there might be a way to configure it somehow.

Offline

#1521 2010-05-18 07:52:10

liniocht
Member
Registered: 2009-10-28
Posts: 45
Website

Re: MLP - The Multi-Lingual Publishing Pack

Btw. MLP doesn’t translate the word in English.
snippet:category
English:Category
Russian:Категория

in English I have /en/category/brush-ink/ not /en/Category/brush-ink/ – it’s not translated

Offline

#1522 2010-05-18 16:44:25

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

Re: MLP - The Multi-Lingual Publishing Pack

Maybe I misunderstood what you want, but try changing Категория to Category (or category), and then view a Russian category page. Isn’t that what you meant?

Offline

#1523 2010-05-18 19:20:35

liniocht
Member
Registered: 2009-10-28
Posts: 45
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els, I’ve set all translations to ‘category’ and it works. But I meant that in terms of efficiency it could be better to disable translations of parts of URL when it’s not needed. But I can live with it – it’s a minor inconvenience. I also meant that for English language the translation of the word ‘category’ is not always done.

Last edited by liniocht (2010-05-18 19:25:30)

Offline

#1524 2010-05-18 19:26:48

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

Re: MLP - The Multi-Lingual Publishing Pack

Ah I see. But that’s your preference (and rightly so in the case of Russian language), others might see it differently. The snippet ‘category’ is translated, when used in the URL it just changes to all lowercase. Try changing the English value for ‘category’ to whatever (‘Blah’?) ;)

Offline

Board footer

Powered by FluxBB