equivalent of "missing=" in Python Script?
Hi I'm trying to do something in what is maybe a stupid way, but it sort of works. I am localising my application for different languages by using: <dtml-var some-variable missing="Default english text"> If there's a folder on the acquisition path containing "some-variable" as a DTML document or a property, you get the translation, otherwise you get the English text. Like I said, maybe a stupid way but it works. The alternative is support N different translated versions of the whole application, which is a lot more work, even though N == 2 at the moment. The problem I am having is all the pages that have <dtml-var title_or_id> in the standard_html_header always show the (English) document title of course. I want to write a Python script local_title to check if the current document has a property (say, title_property). I want to use the value as the name of a variable that will contain the localised title (if it's not missing). If there is no title_property, or it doesn't contain the name of a variable that exists, the script should just return title_or_id as before. So, 3 questions really: 1) Does anyone have a better idea for how to do this? 2) How do you get the value of a property on the current document? 3) How do you check if a variable is missing? Thanks Peter Harris **************************************************************************** This message and any files transmitted with it are confidential. The contents may not be disclosed or used by anyone other than the addressee. If you have received this communication in error, please delete the message and notify JBB (Greater Europe) Plc immediately on 0141-249-6285. The views expressed in this email are not necessarily the views of JBB (Greater Europe) PLC. As it has been transmitted over a public network, JBB (Greater Europe) PLC makes no representation nor accepts any liability for the email's accuracy or completeness unless expressly stated to the contrary. Should you, as the intended recipient, suspect that the message has been intercepted or amended, please notify JBB (Greater Europe) Plc immediately on 0141-249-6285. ****************************************************************************
participants (1)
-
Harris Peter