简体   繁体   中英

How to use non-latin characters as a string in javascript

I am newbie with javascript and I am trying to build my first app with it. I want for the app to change language based on a user selection. I thought about creating Arrays for my buttons etc holding the 3 languages:

var welcomeMessage=[("λσκηφαλκσφ"),"Welcome!", "Добро пожаловать"]

This doesnt work! Any suggestions on how to do this? Help will be much appreciated!

If it works or not depends on the encoding of your file and the encoding the server sends in response headers. This should work if you choose UTF-8 as your encoding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM