Loading OSSN automatically in the language of the browser

OSSN USER Posted in General Discussion 6 years ago

Hi,
OSSN is translated in several languages.
I wish to load it in the language of the browser visiting it.
For that I have a good Javascript .
The Javascript works good on a page did by myself but it doesn't work for OSSN (I probably don't put it on the good pages).

At first I added the Javascript on the page ossn/index.php (cause for me it is the file loaded at first)
On this page, when the language of the browser is detected, i redirect to the file ossn/locale/ossn.xx.php (the xx corresponding of the language of the browser but I think my error is here)
When I load the network, the url add some "/locale" indefinitely (so I have a URL http://myurl/ossn/locale/locale/locale...(indefinitely)/ossn.xx.php).

Of course i think i did something wrong.
If someone can tell me where i made the mistake it would be great.

Thanks

Replies
us Rishi B Replied 6 years ago
us Rishi B Replied 6 years ago

i'd suggest using either the HtmlSidebar component or the Homelancer CSS/JS component. both should allow you to add the javascript you want. Personally, I'm using the HtmlSidebar component to add a javascript function which periodically refreshes the newsfeed page so that new posts show up without the user having to reload the page.