Can i use attribute to choose stack language
Permalink
Looking throught the documentation, I'm wondering if it is possible to use page attributes to display a stack depending on the language chosen. Would that be the way to do go ? What would be the code to achieve this ? MAny thanks
I don't think you need to use page attributes at all, but just look on the language in use and serve the appropriate stack.
The above is based on you using the internationalization add-on. In the example I'm using Swedish and English, with English as fallback if current language isn't Swedish.
If current language is Swedish, then display the stack named 'svenska'. If not Swedish language, display the stack named 'english'.