This content has been marked as final. Show 3 replies
You can actually do that without a property file -1 person found this helpful
In the single page model it's the content that gets translated instead of every page - This means that EVERY item that is to be displayed should be encapsulated in an asset - this might be a bit cumbersome - but if you did it it would be like this:
On a page called Home - you would associate the default (or in Sites speak Master) assets and just create translated copies and then by using a Dimension set that meets your business rules you could display the page in English or French etc -
Your template would 'talk to the Page asset' , get the list of 'default items' then get the appropriate translated copies and render
If you have lots of 'strings' on your pages this might be cumbersome as each 'string' needs to be translated as well - however, (having taken both routes before) it's actually the same amount of work to translate - one can just be updated on the fly (content route) and the other needs a deploy (property file route)
Hope that helps
The guide has no code examples on implementing the Locale filter. How does one go about it?
I can associate the master assets(say English) with the page but how do I render the translated assets (say French) if the user chooses French. Do you use seachstates? Is locale a field in the asset as well? I would not like to hard-code the asset IDs or the locale IDs in the template... Any code would be helpful, thanks.