Our client wants to create landing pages on their site in several different languages. Creating the page with non-english content is easy enough but there is a form on the page as well and I'm not entirely sure how to get this to be multi-lingual.
For an entire site the language can be set and GetDictionaryItem will pick the item for the set language. But how can I do this for an individual page / user control.
uComponents to the rescue - I think the GetDictionaryItem extension is just what you need since you can send a language parameter to it. That means you can make some logic based on the website language to decide, which language you want to fetch dictionary items for the form.
Individual pages in different language
Our client wants to create landing pages on their site in several different languages. Creating the page with non-english content is easy enough but there is a form on the page as well and I'm not entirely sure how to get this to be multi-lingual.
For an entire site the language can be set and GetDictionaryItem will pick the item for the set language. But how can I do this for an individual page / user control.
Hi Suzy
You should be able to use the dictionary items in your user control as well. Try having a look at this post by Tim Geyssens on his blog http://www.nibble.be/?p=14 perhaps there is also something to gain from this post by richard soeteman http://www.richardsoeteman.net/2009/04/01/AutoAddDictionaryItemsAnotherApproach.aspx
Hope this helps.
/Jan
But how do I tell it what language the specific page is in so GetDictionaryItem pulls the language I want on the page not the site language.
Hi Suzy
uComponents to the rescue - I think the GetDictionaryItem extension is just what you need since you can send a language parameter to it. That means you can make some logic based on the website language to decide, which language you want to fetch dictionary items for the form.
Hope this makes sense? You can see the documentation of this extension here: http://ucomponents.org/xslt-extensions/cms/#getdictionaryitem
Hope this helps.
/Jan
It does, thanks xD
I spotted a snippet of code that took a language ID parameter but couldn't see where it came from. Guess it was uComponents.
is working on a reply...