I'm new at the community and I'm running a small moodle community, but I needed to find a quick way of switching between languages, so I can display the lesson or quizz that I'm explaining to the class in the different languages.
After looking for a solution, I've found that there isn't (at least I couldn't find it) a quick plugin or solution for this matter (maybe I'm wrong)
I found at this link that you can change the language simply adding to the current url
"&lang=xx"
where the xx are the desired language (of course you need to have some content in that language and/if you want moodle to look like the selected language, the package) So I inserted the following code to the header and works pretty good for me in any path of the site,
<a href="<?php
# Using REQUEST_URI
echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
?>&lang=es">Spanish</a>
(you can repeat the code for any language and add other link)
but (there is alwas a "but" :p) if you keep changing the language, you'll find a very long url, because everytime add the &lang=xx code, so it would look like this:
/moodle/mod/quiz/attempt.php?id=40&lang=es&lang=kh_cn&lang=zh_cn&lang=en&lang=es&lang=zh_cn&lang=en&lang=zh_cn&lang=es&lang=en&lang=es&lang=zh_cn&lang=en&lang=zh_cn&lang=es&lang=zh_cn&lang=en&lang=es&lang=es&lang=zh_cn&lang=en
and over and over. so this is not an elegant solution, for the moment it fix the problem, but it isn't as elegant as the main page option to change the language.
So if anybody knows a better solution I would be very thankful.
Thanks for your time.