New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@galaxy-stack/orbit-i18n

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@galaxy-stack/orbit-i18n

Internationalization for Orbit — nested translations, interpolation, fallbacks, request locale resolution

latest
Source
npmnpm
Version
0.6.1
Version published
Maintainers
1
Created
Source

@galaxy-stack/orbit-i18n

Internationalization for Orbit — nested translations, interpolation, fallbacks, request locale resolution.

npm version License: MIT

Part of the Orbit framework — a NestJS-style backend framework for Bun.

Installation

bun add @galaxy-stack/orbit-i18n

Usage

import { I18nModule, I18nService, Module, Injectable } from '@galaxy-stack/orbit-i18n';

@Module({
  imports: [I18nModule.forRoot({
    translations: {
      en: { greeting: 'Hello {name}!', nav: { home: 'Home' } },
      vi: { greeting: 'Xin chào {name}!' },
    },
    defaultLocale: 'en',
    fallbackLocale: 'en',
  })],
})
export class AppModule {}

@Injectable()
export class GreetingService {
  constructor(private i18n: I18nService) {}
  greet(name: string, locale: string) {
    return this.i18n.t('greeting', { name }, locale);
  }
}

resolveLocale(request) reads ?lang → x-locale → accept-language → default.

License

MIT

FAQs

Package last updated on 26 Sep 2026

Related posts