Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1069 2008-11-14 22:02:03

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

Re: MLP - The Multi-Lingual Publishing Pack

the_ghost wrote:

1. How can i do this^^?

Not sure if there is a way, but for this case, it would be good to have some attribute like link_empty (or similar)

2. How do i rename English (US) to English ?

In the file l10n_langs.php.

Last edited by maniqui (2008-11-14 22:02:15)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#1070 2008-11-15 02:20:56

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

the_ghost

Try the article_list tag for l10n_lang_list. It should force it to output links, even to non-existent articles. You can then customise your 404 page to show the message. It’s not a perfect solution but should allow you to make some progress with your problem.


Steve

Offline

#1071 2008-11-15 20:16:46

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

Re: MLP - The Multi-Lingual Publishing Pack

Thanks Steve! Adding to attr article_list any variable makes MLP to build link even if article doesn’t have english rendition. now i’m thinking – how to output message “no translation” with the best wasy. And during of of thinkiing developed the way to check…

check if article has renditions of laguages

<txp:variable name="has_lang" value='<txp:l10n_lang_list />' /> 
<txp:smd_if field="txpvar:has_lang" operator="contains" value="english">
has english!
<txp:else />
no english!
</txp:smd_if>

If you need to check if article has more than one translation, the code could look like this:

<txp:variable name="has_lang" value='<txp:l10n_lang_list />' /> 
<txp:smd_if field="txpvar:has_lang,txpvar:has_lang" operator="contains,contains" value="english,deutsh" logic="or">
has english or german!
<txp:else />
there is no english or german!
</txp:smd_if>

And so on…
P.S. Remember – the logic attr in smd_if by default is AND

Last edited by the_ghost (2008-11-15 20:27:05)


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

#1072 2008-11-19 19:50:00

sirNemanjapro
Member
From: Čačak, Serbia
Registered: 2007-12-08
Posts: 59
Website

Re: MLP - The Multi-Lingual Publishing Pack

Since I failed to finish the job on time, Im off it. No longer necessary to help. Thanks anyway.


“… they were enterprising voyages…” – Mr. Spock ( from Spock vs. Q )

Offline

#1073 2008-11-20 16:19:37

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: MLP - The Multi-Lingual Publishing Pack

Two questions:

1) What would be the best way to provide all existing snippets for translating them to new langs, outside TXP? Pages, forms and so on.
2) When adding new languages to a live site having users browsing all the time, what things should be thought about? Any pitfalls to avoid…

Offline

#1074 2008-11-26 07:43:28

slim_u
New Member
Registered: 2008-11-26
Posts: 1

Re: MLP - The Multi-Lingual Publishing Pack

Hi. Im having some problem with MLP. It seems it always sets English as the default language for my site. I see that in the MLP tab default language is the one i want, but when im viewing my site, it chooses English for some reason. Any ideas what im doing wrong?? (when i installed MLP i was using language which i wanted to be my default, not English)

Offline

#1075 2008-11-26 09:16:33

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: MLP - The Multi-Lingual Publishing Pack

slim_u, what is selected as a primary language in your browsers preferences? If not remembering wrong, MLP automatically provides the language user browser is asking for.

Offline

#1076 2008-11-26 11:28:06

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

Re: MLP - The Multi-Lingual Publishing Pack

slim_u wrote:

Hi. Im having some problem with MLP. It seems it always sets English as the default language for my site. I see that in the MLP tab default language is the one i want, but when im viewing my site, it chooses English for some reason. Any ideas what im doing wrong?? (when i installed MLP i was using language which i wanted to be my default, not English)

In MLP settings there is option, by it MLP can try to recognize visitors browsers language by looking through headers. You can find and disable this option. But i don’t remeber its name :)


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

#1077 2008-11-26 17:53:34

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

slim_u

ultramega and Victor are probably right — is your browser set up to request English from whatever site it visits?

If so, you can either change your browser’s preferred language setting to the language you want or look for the Use browser "accept-language" headers? option on the content > MLP > preferences tab and set it to “no” then save your preferences.


Steve

Offline

#1078 2008-11-28 22:46:44

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

Re: MLP - The Multi-Lingual Publishing Pack

In 4.0.7 the drop down language menu at the top of the admin side pages disappeared. (It was still there in r2992.) Otherwise MLP seems to work fine in 4.0.7 :)

Offline

#1079 2008-11-28 23:02:49

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

Els

thank you. Good to see 4.0.7 finish the race and 4.0.8 out of the starting blocks at last. Now that 4.0.7 is static I’ll look at updating the MLP Pack for it.


Steve

Offline

#1080 2008-12-02 19:56:09

maartenD
Member
From: Warnsveld, The Netherlands
Registered: 2007-12-08
Posts: 47
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hello all,

I would like to update to Txp 4.0.7, I make use of the MLP plugin and i have two question. When i look at the database i see that all data stored in the database use utf8_general_ci. Only the tables created by MLP have the value latin1_swedish_ci.

Can somebody tell me if this can create problems when upgrading to 4.0.7? Second questions, is there a way to change these tables to utf8_general_ci?

Sorry when this is not the right forum group to post this question.

I don’t know much about databases so i hope somebody can answer my questions.

Thanks in advance.

Kind regards,

Maarten.


Kind regards,

Maarten

Offline

Board footer

Powered by FluxBB