How to compare a value with variations?

Get help using Construct 2

Post » Tue Mar 19, 2013 12:15 pm

Hi guys, i'm looking a quick solution to compare a value in following instruction:

the browser language is "en" as string.

I want to use "en" string as event compare 2 values for all english browsers.



But the observed result... they return like "en_US", "en_UK", "en_CA", "en_AU", etc.


How to make it work to support all browser languages using special string "en" by one event?
B
111
S
30
G
28
Posts: 3,108
Reputation: 27,122

Post » Tue Mar 19, 2013 12:50 pm

"en" = left(browser.language, 2) should work :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,232

Post » Wed Mar 20, 2013 4:22 am

@vee41 thanks! it worked like charm :)
B
111
S
30
G
28
Posts: 3,108
Reputation: 27,122


Return to How do I....?

Who is online

Users browsing this forum: KreKre, ninepixels, oddreal, Pulstar and 10 guests