I'm developing a page that content editors can add news articles to. The editor selects a language for each article and once saved and published, appears in the list. The list XSLT cycles through the articles and displays only the articles that match the browsers' language.
I'm currently using query strings to achieve this, but need to automate the culture detection.
Im trying to achieve this by extending the XSLT with javascript. The problem is that when referencing the "navigator" object, the XSLT throws an exception ("Variable 'navigator' is not declared").
Could anybody suggest a better method in obtaining the client browser culture for an XLST logical operation or offer any help for the error I'm getting with javascript?
Creating a Culture-dependant article list in XLST
Hi there!
I'm developing a page that content editors can add news articles to. The editor selects a language for each article and once saved and published, appears in the list. The list XSLT cycles through the articles and displays only the articles that match the browsers' language.
I'm currently using query strings to achieve this, but need to automate the culture detection.
Im trying to achieve this by extending the XSLT with javascript. The problem is that when referencing the "navigator" object, the XSLT throws an exception ("Variable 'navigator' is not declared").
Could anybody suggest a better method in obtaining the client browser culture for an XLST logical operation or offer any help for the error I'm getting with javascript?
Thanks
Lewis
You can create your own XsltExtension like this:
hth, Thomas
Yes, Thanks.
I initially tried to avoid this method but I cannot seem to find a viable alternative.
Thanks for the help.
is working on a reply...