You are not logged in.
maniqui
hello again. Ok, I’ll look into those when I’ve finished my latest set of changes. FYI, I’m re-writing the mlp url handler at the moment to fix a bunch of problems Kjeld found some time ago. After that I intend updating sed_afu for 4.0.6+,
Stef
Already done in the source. In fact, I had already made a change to make sure mlp’s pretext() routine is always the first called, irrespective of plugin load order (even before there was such a thing.)
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
net-carver wrote:
I had already made a change to make sure mlp’s
pretext()routine is always the first called, irrespective of plugin load order
Way cool; didn’t realise but I should have figured you’d be several steps ahead of the game :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern.
Txp Builders – finely-crafted code, design and Txp
Offline
Was there somewhere guide how to add languages to MLP? I installed german from txp-prefs, but next what? How the new table for it is created, what is correct mysql character set for that table and what should the lang code for german be?
Last edited by ultramega (2008-06-17 10:37:57)
Offline
ultramega
You need to add the string “de-de” (without the quotes) to the Content > MLP > Preferences > Languages preference and then save it. That should take care of creating a new language table for you. Just take a look at the Content > MLP > Articles tab and you should then see a new column for German.
After that it’s a matter of either cloning existing renditions into German for translation or just starting a new rendition in German by visiting the Content > Write tab.
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
Ahaa, ok! Does that create new table with right character settings too (not sure what it should be for german…)? Thanks for helping!
Offline
ultramega wrote:
Ahaa, ok! Does that create new table with right character settings too (not sure what it should be for german…)? Thanks for helping!
Yes, it creates the new table using a utf8 character set.
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
Possible to somehow hide languages which are being worked on the background? Meaning how to hide one language-link from articles and sitewide lang selector until all snippets and articles are translated?
Offline
ultramega wrote:
Possible to somehow hide languages which are being worked on the background?
Not at present. That does sound like a useful feature for those who grow their site a language at a time. Will think about it.
— Steve
Textile | My plugins on GitHub | @netcarver
Offline
ultramega
Turned out to be very easy. Feature added in the development code. If you want to make the change to your installation just edit the plugin and look for this code block…
function l10n_lang_list( $atts ) { global $thisarticle , $l10n_language, $is_article_list , $pretext, $prefs;extract(lAtts(array( 'title' => '', # Title will be prepended as a paragraph. 'on404' => '', # Set this to non-blank to force special 404 processing
… replace it with this …
function l10n_lang_list( $atts ) { global $thisarticle , $l10n_language, $is_article_list , $pretext, $prefs;extract(lAtts(array( 'title' => '', # Title will be prepended as a paragraph. 'surpress_langs' => '', # Comma separated list of site languages to hide 'on404' => '', # Set this to non-blank to force special 404 processing
Then look for this a little farther down (maybe a page or two) the file…
$list = array();
static $alangs;
$slangs = MLPLanguageHandler::get_site_langs();
… and replace with…
$list = array(); static $alangs; $slangs = MLPLanguageHandler::get_site_langs();$surpress_langs = do_list( trim( $surpress_langs ) ); $slangs = array_diff( $slangs , $surpress_langs );
… and save the changes.
Next: edit your page or form that uses the l10n_lang_list tag. Add surpress_langs="your-lang" to it’s attributes, save the form and view the result.
Hope that helps.
— Steve
Textile | My plugins on GitHub | @netcarver
Offline