Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Tip: multilingual variable workaround

You may need different variable values for every language in your site.  CityDesk does not support this at this time.

You can work around this limitation by using articles instead.

Steps:
1. Create a uniquely named article.
2. Enter data in the article body and/or one or more article properties.
3. Access the article body and/or properties using the (filename "...") CityScript condition.  This can be done in HTML files and templates.

Example:
1. Create an article named "CompanyName" in any folder.
2. Enter data in the body for each language in the site.
2. In CityDesk, add a new HTML file or template containing the following code:

{$ foreach 1 var in (filename "PageHeader") $}
    {$ var.body $}
{$next$}

This will display the body for the current language.

Bernard Vander Beken
Monday, January 28, 2002

great idea!

When Service pack 1 comes out, you'll even be able to put that whole mess into an actual variable, because CityScript in SP1 will be fully-recursive.

Joel Spolsky
Friday, February 01, 2002

*  Recent Topics

*  Fog Creek Home