Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • PlayStream /
avatar image
Question by GospelOfMyHeart · Mar 29, 2021 at 03:47 PM · Player DataPlayStreamanalytics

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?

Comment

People who like this

0 Show 2
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ivan Cai ♦ · Mar 30, 2021 at 01:58 AM 0
Share

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

avatar image GospelOfMyHeart Ivan Cai ♦ · Mar 30, 2021 at 12:56 PM 0
Share


This information is from "player_device_info" event

изображение-2021-03-30-154741.png (51.6 kB)

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Ivan Cai · Mar 31, 2021 at 08:13 AM

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".

Comment
GospelOfMyHeart

People who like this

1 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GospelOfMyHeart · Mar 31, 2021 at 11:57 AM 0
Share

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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    We are having title_exceeded_limit warning, how do we focus on the calls causing it? 1 Answer

    Can the BOM be removed from PlayStream archive events? 3 Answers

    How to revoke player inventory item from the console and automatically update the player data 1 Answer

    Aggregate custom events into a Histogram from Cloud Script (or anything that runs e.g daily) 1 Answer

    Track game crashes with analytics. 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges