question

Iphinis avatar image
Iphinis asked

How can I get the player's profile language ?

Hello I know how I can set a language to a player, but how can I get the language of the player to translate my game ? I searched some apis but all I found is "PlayFabProfilesAPI.SetProfileLanguage" (or similary things). So if I want to translate my game in multiple languages, how I can do it and is it the best solution ?

Thanks.

apis
10 |1200

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

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

>>> Hello I know how I can set a language to a player, but how can I get the language of the player to translate my game ?

You can get the language from calling GetProfile. It is used by PlayFab service internally to set the Title News Language to the corresponding player’s language.

Besides, for clear, both the title news and the game body text should be translated by game developers selves(or other people responsible for this part). PlayFab doesn’t provide the translation service, we set the player’s profile language just like set a flag. Then the flag can be used both by PlayFab service internally and clients.

>>> So if I want to translate my game in multiple languages, how I can do it and is it the best solution ?

You can refer to the following possible process.

  1. Translate the game and title news by yourself.
  2. Package the different language assets like a asset bundle then upload it to the PlayFab CDN.
  3. Add an option on your game’s menu, let players choose the language they want.
  4. After they chose the language, update the player profile language.
  5. Call GetProfile, according to the language code download the language packages.
10 |1200

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

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.