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
96
S
34
G
29
Posts: 3,139
Reputation: 28,236

Post » Tue Mar 19, 2013 12:50 pm

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

Post » Wed Mar 20, 2013 4:22 am

@vee41 thanks! it worked like charm :)
B
96
S
34
G
29
Posts: 3,139
Reputation: 28,236


Return to How do I....?

Who is online

Users browsing this forum: Neiroe and 11 guests