The KigoContext.locale object allows you to customize various labels used in the wallet interface to match the language and terminology of your application. This customization helps ensure that the wallet UI aligns with your brand’s tone and the user’s expectations.

Example: Customizing Locale Labels

You can set up the localization by passing a locale object when initializing the Kigo context. Here’s an example:

kigo.setContext({
  locale: {
    walletLabel: {
      singular: "Hub",
      plural: "Hubs",
    },
    rewardLabel: {
      singular: "Benefit",
      plural: "Benefits",
    },
    claimLabel: {
      singular: "Voucher",
      plural: "Vouchers",
    },
    revealLabel: {
      singular: "Unlock",
      plural: "Unlocks",
    },
    offerLabel: {
      singular: "Deal",
      plural: "Deals",
    },
    programNameLabel: {
      singular: "My Perks",
      plural: "My Perks",
    },
  },
});

Supported Locale Properties

Each of these properties can take a singular and a plural form, allowing you to accurately reflect the context in which these labels are used within your application.

  • walletLabel

    • Description: Custom labels for the wallet, used in the Wallet header and throughout the application.
    • Default:
      {
        singular: "Wallet",
        plural: "Wallets"
      }
      
    • Valid values: string for both singular and plural.
    • Example:
      walletLabel: {
        singular: "Hub",
        plural: "Hubs"
      }
      
  • rewardLabel

    • Description: Custom labels for rewards.
    • Default:
      {
        singular: "Reward",
        plural: "Rewards"
      }
      
    • Valid values: string for both singular and plural.
    • Example:
      rewardLabel: {
        singular: "Benefit",
        plural: "Benefits"
      }
      
  • claimLabel

    • Description: Custom labels for claims.
    • Default:
      {
        singular: "Claim",
        plural: "Claims"
      }
      
    • Valid values: string for both singular and plural.
    • Example:
      claimLabel: {
        singular: "Voucher",
        plural: "Vouchers"
      }
      
  • revealLabel

    • Description: Custom labels for reveals.
    • Default:
      {
        singular: "Reveal",
        plural: "Reveals"
      }
      
    • Valid values: string for both singular and plural.
    • Example:
      revealLabel: {
        singular: "Unlock",
        plural: "Unlocks"
      }
      
  • offerLabel

    • Description: Custom labels for offers.
    • Default:
      {
        singular: "Offer",
        plural: "Offers"
      }
      
    • Valid values: string for both singular and plural.
    • Example:
      offerLabel: {
        singular: "Deal",
        plural: "Deals"
      }
      
  • programNameLabel

    • Description: Custom labels for program names.
    • Default:
      {
        singular: "Program",
        plural: "Programs"
      }
      
    • Valid values: string for both singular and plural.
    • Example:
      programNameLabel: {
        singular: "My Perks",
        plural: "My Perks"
      }