question

gospelofmyheart avatar image
gospelofmyheart asked

How to convert Country code to string value

I`m trying to get country from player_logged_in event. But only thing i could get is numeric value of country code. How can i convert this value to string?

Player DataanalyticsPlayStream
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ivan Cai avatar image Ivan Cai ♦ commented ·

I want to know what is the numeric value of country code you mentioned?

0 Likes 0 ·
gospelofmyheart avatar image gospelofmyheart Ivan Cai ♦ commented ·


This information is from "player_device_info" event

0 Likes 0 ·

1 Answer

·
Ivan Cai avatar image
Ivan Cai answered

You can get countrycode that two-character ISO 3166-1 from "player_logged_in" event. However, the countrycode from ""player_device_info" event "is a number that is a index in the countrycode. For instance, countrycode string "SG", its index is "199".

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gospelofmyheart avatar image gospelofmyheart commented ·

That`s what i needed, thanks! Maybe there is some way to convert this code to full country name like "RU" to "Russia"?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.