Skip to Content
DocumentationInternationalization

Internationalization

GuideKit ships with 8 built-in locales and supports custom string overrides for full localization control.

Built-in Locales

CodeLanguage
enEnglish (default)
esSpanish
frFrench
deGerman
ptPortuguese
jaJapanese
koKorean
zhChinese (Simplified)

Setting the Locale

<GuideKitProvider tokenEndpoint="/api/guidekit/token" agent={{ name: 'Guide' }} options={{ locale: 'es' }} > {children} </GuideKitProvider>

Custom Strings

Override any built-in string by passing a strings object:

<GuideKitProvider tokenEndpoint="/api/guidekit/token" agent={{ name: 'Guide' }} options={{ locale: 'en', strings: { 'widget.placeholder': 'Ask me anything...', 'widget.greeting': 'Welcome! How can I assist?', 'widget.send': 'Send', 'widget.close': 'Close assistant', 'voice.listening': 'Listening...', 'voice.processing': 'Processing...', 'error.generic': 'Something went wrong. Please try again.', }, }} > {children} </GuideKitProvider>

Adding a New Locale

To add a locale that is not built in, provide a complete strings object:

options={{ locale: 'custom', strings: { 'widget.placeholder': 'Your custom placeholder...', // ... all string keys }, }}

RTL Support

The Shadow DOM widget respects the dir attribute on the host document. Set dir="rtl" on your <html> element for right-to-left layouts.

Dynamic Locale Switching

The locale can be changed at runtime by updating the provider props. The widget re-renders with the new strings immediately.

Last updated on