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
105
S
29
G
28
Posts: 3,102
Reputation: 27,380

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,222

Post » Wed Mar 20, 2013 4:22 am

@vee41 thanks! it worked like charm :)
B
105
S
29
G
28
Posts: 3,102
Reputation: 27,380


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests