I'm using the Browser Sniff plugin to detect for the browser language on a multilangiage site using Transcribe plugin. It's working for detecting the browser language. I want to redirect users with their browser set to Chinese(zh) to the same url with "zh" as segment_1. So the site currently will display English at www.site.com/page and chinese at www.site.com/zh/page. Now I want to redirect users with their browser set to Chinese from www.site.com/page to www.site.com/zh/page.
I tried this, but it results in a redirect loop:
{exp:browser_sniff available_languages="en|zh"}
{if browser_sniff_negotiated_language == "zh"}
{redirect="zh/{uri_string}"}
{/if}
{/exp:browser_sniff}
Any ideas?