- Home /
How to acces extern variable (language fr/en) for Unity Web Player
Hi, I made a a bilingue online game (En/Fr). The unity Web player will be host on a bilingue website, and I would like to set the language at the start of the game based on the current language used on the website.
Thanks for your support.
Answer by tanoshimi · Jun 17, 2014 at 02:30 PM
If the different languages of your website have different URLs then you should be able to differentiate using the absoluteURL parameter: http://docs.unity3d.com/ScriptReference/Application-absoluteURL.html
Otherwise, you can use Application.ExternalEval to evaluate arbitrary code in the browser to determine the current language and send the result back to the webplayer: http://docs.unity3d.com/Manual/UnityWebPlayerandbrowsercommunication.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613151751im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
WebPlayer Build 1 Answer
FPS Webplayer problem 0 Answers
Web player performance problem on MAC OS X 3 Answers
Any caching options available for things dynamically loaded by WebPlayer? 0 Answers