Saturday, July 18, 2009, 2:53:23 PM, SteP wrote: > Thank you, Hans, that looks good to me. Would this new markup need to make > the current one > obsolete? I would prefer to support both markup forms, with the > older (:if userlang xx:)(:title yyyy:) being > deprecated but still valid. In which case the last part of > multilanguage.php would stay untouched.
The conditional (:if userlang xx:) stays intact. The normal (:title yyyyyy:) stays intact too. So both together will continue to work. But we add an alternative (:title-xx yyyyyyy:) markup. > I think that the multilanguage recipe already requires declaring > all the language identifiers in array > $DefaultLanguages. So there would be no need to change this part also. No. At present $DefaultLanguages is just for declaring a default language, which is used when the choosen language is not available inside a conditional. At present you can check 'if userlang' against any string. It does not need to be defined in a config array. I propose that all language identifiers are declared. This change is not compatible with the existing recipe. > I think we should just leave all the current code in place, and > just add code for the new markup. The > two methods can cohexist, and the new method will slowly displace > the old one, because it offers the > advantage of not requiring conditional markup. My question is: does the recipe need to have a mechanism to pick up which languages are used on a page? The simpler solution is to scrap that, and to rely on the languages declared in a config array. But this means that if the recipe supports a (:selectlang:) directive to display links for changing the language, this will h=give all the choices, even if they are not implemented on the particular page. also the 'if langinpage' conditional will not be available. ~Hans _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
