subtle problem

subtle problem

I think that this is really a javascript problem, but it could be jquery, php, or even mysql. (sigh)

I am loading from a backend process, a translation "object". Depending on the language, the results may look like one of the following:

var en={ 'Contact':'Contact' ,'Login':'Login' ,'Password':'Password' ,'Password Help':'Password Help' ,'Privacy Policy':'Privacy Policy' ,'Privacy Policy Content':'Privacy? You're kidding, right?' ,'Technical Info':'Technical Info' ,'Technical Info Content':'Too complicated to explain' ,'Terms of Use':'Terms of Use' ,'Terms of Use Content':'You use it and you will like it' ,'Who We Are':'Who We Are' ,'Who We Are Content':'We are the mighty ones' };

var es={ 'Contact':'Contacto' ,'Login':'Inicio' ,'Password':'Clave' ,'Password Help':'Ayudar con clave' ,'Privacy Policy':'Política de Privacidad' ,'Privacy Policy Content':'Política de Privacidad contenido' ,'Technical Info':'Información Técnica' ,'Technical Info Content':'Información Técnica Contenido' ,'Terms of Use':'Términos y Condiciones de Uso' ,'Terms of Use Content':'Términos y Condiciones de Uso contenido' ,'Who We Are':'Quiénes somos' ,'Who We Are Content':'Quiénes somos Contenido' };

var zh={ 'Contact':'Contact' ,'Login':'Login' ,'Password':'密碼' ,'Password Help':'密碼幫助' ,'Privacy Policy':'Privacy Policy' ,'Privacy Policy Content':'Privacy? You're kidding, right?' ,'Technical Info':'Technical Info' ,'Technical Info Content':'Too complicated to explain' ,'Terms of Use':'Terms of Use' ,'Terms of Use Content':'You use it and you will like it' ,'Who We Are':'Who We Are' ,'Who We Are Content':'We are the mighty ones' };

I do an eval(data) on this returned value and then using jquery update the content in divs with a class of "translate" replacing the content with the values found in this data string.

It works pretty smoothly and quickly, with the exception of Chinese. The eval statement sometimes breaks telling me that: " missing } after property list". This isn't true will all Chinese words, it sometimes works on other pages. However, the example above does break.

I've tried using double quotes instead of the single quotes, to no avail.

Any ideas/suggestions would be appreciated.