Skip to content

Multilingual Processing

Introduction

Provides multilingual conversion interfaces for bet information, game entries, etc.

API

Language List

1. Get Language Identifier List

Interface: POST /api/v1/common/get_language_list

Brief Description

Get the list of language identifiers supported by Hash Game

Success Example

json
{
  "code": 0,
  "msg": "SUCCESS",
  "data": {
    "list": [
      {
        "code": "zh-CN",
        "name": "Simplified Chinese"
      },
      {
        "code": "zh-TW",
        "name": "Traditional Chinese"
      },
      {
        "code": "ja-JP",
        "name": "Japanese"
      },
      {
        "code": "ko-KR",
        "name": "Korean"
      },
      {
        "code": "hi-IN",
        "name": "Hindi"
      }
    ]
  }
}

Error Response

ParameterRequiredData TypeDescription
codeYesintError code (refer to error code documentation)
msgYesstringError description

Multilingual Information

1. Get Bet Information Multilingual Information

Interface: POST /api/v1/common/batch_get_bet_i18n

Brief Description

bet_info JSON Structure Example

json
[
  {
    "key": "Big",
    "name": "Big",
    "amount": 1,
    "odds": 1.95,
    "result": "win"
  }
]

For example, to display the value of name, you can get multilingual information through this interface

Request Parameters

Parameter NameRequiredTypeDescriptionExample Value
game_codeYesstringGame typepc28
localesNostringLanguage identifiers (supports multiple language identifiers, separated by commas)en-US,zh-TW

Success Example

json
{
  "code": 0,
  "msg": "SUCCESS",
  "data": {
    "list": [
      {
        "locale": "en-US",
        "items": [
          {
            "key": "BigEven",
            "value": "Big Even"
          },
          {
            "key": "BigOdd",
            "value": "Big Odd"
          }
        ]
      },
      {
        "locale": "zh-TW",
        "items": [
          {
            "key": "UltraBig",
            "value": "Ultra Big"
          },
          {
            "key": "UltraSmall",
            "value": "Ultra Small"
          }
        ]
      }
    ]
  }
}

Error Response

ParameterRequiredData TypeDescription
codeYesintError code (refer to error code documentation)
msgYesstringError description

2. Get Game Entry Multilingual Information

Interface: POST /api/v1/common/batch_get_entry_i18n

Brief Description

You can get multilingual information for game entries through this interface, such as Hash Big/Small, Hash Niu Niu, etc.

Request Parameters

Parameter NameRequiredTypeDescriptionExample Value
entry_keyNostringGame entry typehxnn-1
localesNostringLanguage identifiers (supports multiple language identifiers, separated by commas)en-US,zh-TW

Success Example

json
{
  "code": 0,
  "msg": "SUCCESS",
  "data": {
    "list": [
      {
        "locale": "en-US",
        "items": [
          {
            "key": "hxdx-2",
            "value": "1-min Hash Big/Small"
          },
          {
            "key": "hxds-1",
            "value": "Hash Odd/Even"
          }
        ]
      },
      {
        "locale": "zh-TW",
        "items": [
          {
            "key": "hxds-3",
            "value": "3-min Hash Odd/Even"
          },
          {
            "key": "hxxy-1",
            "value": "Lucky Hash"
          }
        ]
      }
    ]
  }
}

Error Response

ParameterRequiredData TypeDescription
codeYesintError code (refer to error code documentation)
msgYesstringError description

3. Get Room Name Multilingual Information

Interface: POST /api/v1/common/batch_get_room_i18n

Brief Description

You can get multilingual information for game entries through this interface, such as Hash Big/Small, Hash Niu Niu, etc.

Request Parameters

Parameter NameRequiredTypeDescriptionExample Value
room_idNoint32Room ID1
localesNostringLanguage identifiers (supports multiple language identifiers, separated by commas)en-US,zh-TW

Success Example

json
{
  "code": 0,
  "msg": "SUCCESS",
  "data": {
    "list": [
      {
        "locale": "en-US",
        "items": [
          {
            "key": "1",
            "value": "1-min Hash Big/Small"
          },
          {
            "key": "2",
            "value": "Hash Odd/Even"
          }
        ]
      },
      {
        "locale": "zh-TW",
        "items": [
          {
            "key": "1",
            "value": "3-min Hash Odd/Even"
          },
          {
            "key": "2",
            "value": "Lucky Hash"
          }
        ]
      }
    ]
  }
}

Error Response

ParameterRequiredData TypeDescription
codeYesintError code (refer to error code documentation)
msgYesstringError description