Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Multilingual variables

Can anyone tell me how to set up multilingual variables? E.g. .Sitename in English and Spanish? I can find no Translate on the Variables dialog...

Alternatively I'd be happy to use a tiny article for Sitename, but how do I #include one article's body into another article at publish time?

Thanks.

Chris John Jordan
Monday, March 25, 2002

Some things about multilingual sites.

CityDesk will publish a version of your site in each language you specify, so it assumes ALL articles will be in EVERY language. HTML pages on the other hand get published pretty much as-is, but since you can have all pages articles now, this isn't much of a problem.

Instead of #include you do something like

{$foreach x in (filename "the article you want to pull in")$} {$x.body$} {$next$}

This creates a mini loop that pulls that one article in.

Once you add a language to the language section, enter into an article, go to View / Second Language and choose your second language. The screen will split allowing you to enter the Primary/Secondary language into each half. You can have, as far as I know, unlimited alternate languages.

Once you have your site in multiple languages, linking between them and publishing is a bit stickier, but I'm sure if you ask we'd be glad to help. =)

Mark W
Tuesday, March 26, 2002

So every variable reference such as

($.myvar$}

turns into not even

($"myvar".body$)

but

{$foreach x in (filename "myvar")$} {$x.body$} {$next$}

Ugh. Any better solution anyone?

PS I'd love to know why Fog Creek don't allow variable translation.

Chris John Jordan
Tuesday, March 26, 2002

Well, in a template it would be {$.body$} but if you were to pull the body of one article into another, then it would be what I said.

Mark W
Tuesday, March 26, 2002

It would probably be "cleaner" if we allowed variable translation, but you can accomplish the same thing currently in 1.0.27.

Just make two variables, one for the first language named VAR and one for the second language named VAR2.

Then in the article when you translate it, on the left for the original language you use VAR and for the translated language you use VAR2.

Michael H. Pryor
Tuesday, March 26, 2002

Thanks for the suggestion, but that doesn't work where the variables are in templates i.e. most of the time, such as in the CityDesk Getting Started example.

Chris John Jordan
Tuesday, March 26, 2002

Ah yes, that's true.  Here's another workaround.
Copy the template family and make a new family for the other language.  Then set up two publish locations.  One uses the first language and the first template family and the second uses the second language and the second template.  Then you can translate templates and translate articles.

Michael H. Pryor
Wednesday, March 27, 2002

I can't ask the site owner to hack about in designer mode when he just wants to translate to a new language.

Would you forward to the design team the suggestion that, to complete the otherwise excellent internationalisation support, they add the facility to translate variables? Thanks.

Chris John Jordan
Thursday, March 28, 2002

Chris,

Thanks for your suggestion and we'll certainly take it into consideration for a future version.

Michael H. Pryor
Thursday, March 28, 2002

Thanks.

Chris John Jordan
Friday, March 29, 2002

A user-friendly workaround is described in a previously posted message:

Tip: multilingual variable workaround
http://discuss.fogcreek.com/citydesk/default.asp?cmd=show&ixPost=1710&ixReplies=1

Bernard Vander Beken
Saturday, April 06, 2002

*  Recent Topics

*  Fog Creek Home