Kigo Context - Locale

Kigo Locale Configuration

Overview

The Kigo Locale Configuration System enables SDK-hosted sites and white-label implementations to customize language and labels used throughout the user experience. This system supports both singular and plural variations of key UI terms, providing flexibility for partner-specific branding and localization needs.

The configuration is defined under the locale key within the SDK context and is useful for partners looking to adjust copy without changing the core functionality or structure of the application.


Priority & Structure

Locale settings follow a hierarchy of overrides for maximum flexibility and control.

Configuration Priority

  1. Program-level configuration (set in database)
  2. Hosted site override via locale in context
  3. SDK default values (fallbacks)

Locale Context Structure

export type LocaleOverride = {
  claimLabel: { singular: string; plural: string };
  offerLabel: { singular: string; plural: string };
  programNameLabel: { singular: string; plural: string };
  revealLabel: { singular: string; plural: string };
  rewardLabel: { singular: string; plural: string };
  walletLabel: { singular: string; plural: string };
  cardLabel: { singular: string; plural: string };
  cashBackLabel: { singular: string; plural: string };
  mastercardLabel: { singular: string; plural: string };
  locationLabel: { singular: string; plural?: string };
};

Each label group allows for a singular and plural value to be defined. If plural is omitted, singular will be used in all cases.


Example Configuration

const locale = {
  claimLabel: { singular: "claim", plural: "claims" },
  offerLabel: { singular: "offer", plural: "offers" },
  programNameLabel: { singular: "Program", plural: "Programs" },
  revealLabel: { singular: "reveal", plural: "reveals" },
  rewardLabel: { singular: "reward", plural: "rewards" },
  walletLabel: { singular: "Wallet", plural: "Wallets" },
  cardLabel: { singular: "card", plural: "Cards" },
  cashBackLabel: { singular: "Cash Back", plural: "Cash Back" },
  mastercardLabel: { singular: "Mastercard", plural: "Mastercards" },
  locationLabel: { singular: "location", plural: "locations" }
};

Integration with SDK Context

You can integrate locale overrides directly into the SDK initialization:

window.Kigo.setContext({
  locale: {
    rewardLabel: { singular: "reward", plural: "rewards" },
    walletLabel: { singular: "Wallet", plural: "Wallets" },
    // Add any other overrides as needed
  }
});

Best Practices

1. Brand Alignment

  • Use terms that are aligned with your partner or brand's language style.
  • For example, replace reward with perk, or offer with deal.

2. Consistent Grammar

  • Always define both singular and plural for clarity.
  • Keep grammar rules consistent throughout the interface.

3. Localization Testing

  • Test on multiple screen sizes to confirm layout is preserved.
  • Ensure labels aren’t truncated or overflowing UI elements.

Troubleshooting

Common Issues

  1. Label not updating:
    Confirm your locale overrides are present in the SDK context and spelled correctly.

  2. Missing plural fallback:
    If a plural value is not set, the singular form will be used as fallback.

  3. Not reflecting changes:
    Ensure cache is cleared and SDK is using the latest context payload.


Summary

The locale configuration system provides partners and hosted sites with flexibility to personalize terminology for their users. This improves UX clarity, supports localization efforts, and helps align with brand guidelines—all without modifying core SDK logic.