Skip to content

MIT LicenseTypeScriptnpm

Comprehensive internationalization (i18n) and globalization support for the ziegel framework. Provides cultures, calendars, regions, time zones, formatting, and localization for global applications.

Internationalization: Complete i18n solution with multi-calendar support, culture information, formatting, and globalization resources.

🚀 Overview ​

@breadstone/ziegel-intl provides:

  • Multi-Calendar Support: Gregorian, Hebrew, Hijri, Japanese, Korean, Persian, Thai Buddhist, Chinese Lunisolar, and more
  • Culture Information: Comprehensive culture and language data with formatting rules
  • Regional Data: Geographic and cultural region information
  • Time Zone Management: Time zone handling, conversion, and calculations
  • Formatting System: Date/time and number formatting with locale support
  • Format Decorators: Easy formatting via TypeScript decorators
  • Globalization Resources: String resources and localization support

📦 Installation ​

bash
npm install @breadstone/ziegel-intl
# or
yarn add @breadstone/ziegel-intl

🧩 Features & Usage Examples ​

Culture Information ​

typescript
import { CultureInfo, DateTimeFormatInfo, NumberFormatInfo } from '@breadstone/ziegel-intl';

const culture = new CultureInfo('en-US');
const dateFormat = culture.dateTimeFormat;
const numberFormat = culture.numberFormat;

Calendar Systems ​

typescript
import {
  GregorianCalendar,
  HijriCalendar,
  HebrewCalendar,
  JapaneseCalendar,
  PersianCalendar,
  ThaiBuddhistCalendar,
} from '@breadstone/ziegel-intl';

const gregorian = new GregorianCalendar();
const hijri = new HijriCalendar();
const japanese = new JapaneseCalendar();
const persian = new PersianCalendar();

Date/Time Formatting ​

typescript
import { DateTimeFormat, Format } from '@breadstone/ziegel-intl';

class EventService {
  @Format('yyyy-MM-dd HH:mm:ss')
  formatEventTime(date: Date): string {
    return DateTimeFormat.format(date, 'yyyy-MM-dd HH:mm:ss');
  }
}

Region and Time Zone ​

typescript
import { RegionInfo, TimeZoneInfo } from '@breadstone/ziegel-intl';

const usRegion = new RegionInfo('US');
const nyTimeZone = TimeZoneInfo.findSystemTimeZoneById('America/New_York');
const utcOffset = nyTimeZone.getUtcOffset(new Date());

Globalization Resources ​

typescript
import { GlobalizationResource, IGlobalizationResource } from '@breadstone/ziegel-intl';

@GlobalizationResource('MyResources')
class MyLocalizedClass {
  // Class with globalization support
}

📅 Supported Calendar Systems ​

Major Calendar Systems ​

  • GregorianCalendar: Standard Western calendar
  • HijriCalendar: Islamic calendar
  • HebrewCalendar: Jewish calendar
  • JapaneseCalendar: Japanese era-based calendar
  • KoreanCalendar: Korean calendar system
  • PersianCalendar: Persian/Iranian calendar
  • ThaiBuddhistCalendar: Thai Buddhist calendar

Lunisolar Calendars ​

  • ChineseLunisolarCalendar: Chinese traditional calendar
  • JapaneseLunisolarCalendar: Japanese lunisolar calendar
  • KoreanLunisolarCalendar: Korean lunisolar calendar
  • TaiwanLunisolarCalendar: Taiwan lunisolar calendar

Historical Calendars ​

  • JulianCalendar: Historical Julian calendar
  • UmAlQuraCalendar: Saudi Arabian calendar
  • TaiwanCalendar: Republic of China calendar

📚 Package import points ​

typescript
import {
  // Formatting
  Formatting,
  DateTimeFormat,
  Format,
  TimeSpanFormat,

  // Globalization Core
  Globalization,
  Culture,
  CultureInfo,

  // Calendar Systems
  Calendar,
  CalendarWeekRule,
  ICalendarInfo,
  GregorianCalendar,
  HijriCalendar,
  HebrewCalendar,
  JapaneseCalendar,
  JulianCalendar,
  KoreanCalendar,
  PersianCalendar,
  ThaiBuddhistCalendar,

  // Lunisolar Calendars
  ChineseLunisolarCalendar,
  JapaneseLunisolarCalendar,
  KoreanLunisolarCalendar,
  TaiwanLunisolarCalendar,
  TaiwanCalendar,
  UmAlQuraCalendar,

  // Format Information
  DateTimeFormatInfo,
  IDateTimeFormatInfo,
  NumberFormatInfo,
  INumberFormatInfo,

  // Region Information
  RegionInfo,
  IRegionInfo,

  // Time Zone Management
  TimeZone,
  TimeZoneInfo,
  TimeZoneExtensions,
  ITimeZone,

  // Globalization Resources
  GlobalizationResource,
  IGlobalizationResource,
} from '@breadstone/ziegel-intl';

📚 API Documentation ​

  • @breadstone/ziegel-core: Foundation utilities and type definitions
  • @breadstone/ziegel-intl-commerce: Commerce-specific internationalization
  • @breadstone/ziegel-intl-units: Units of measurement and conversion

License ​

MIT

Issues ​

Please report bugs and feature requests in the Issue Tracker


Part of the ziegel Enterprise TypeScript Framework

License ​

MIT

Package import points ​

typescript
import {
  // Formatting
  Formatting,
  DateTimeFormat,
  Format,
  TimeSpanFormat,

  // Globalization Core
  Globalization,
  CultureInfo,
  DateTimeFormatInfo,
  NumberFormatInfo,
  RegionInfo,
  TimeZoneInfo,
  Culture,
  TimeZone,
  IDateTimeFormatInfo,
  INumberFormatInfo,
  IRegionInfo,

  // Calendars
  Calendar,
  CalendarWeekRule,
  GregorianCalendar,
  HijriCalendar,
  HebrewCalendar,
  JapaneseCalendar,
  KoreanCalendar,
  PersianCalendar,
  ThaiBuddhistCalendar,
  ChineseLunisolarCalendar,
  JapaneseLunisolarCalendar,
  KoreanLunisolarCalendar,
  TaiwanCalendar,
  TaiwanLunisolarCalendar,
  UmAlQuraCalendar,
  JulianCalendar,
  ICalendarInfo,

  // Decorators
  GlobalizationResource,
  IGlobalizationResource,

  // Extensions & Interfaces
  TimeZoneExtensions,
  ITimeZone,
} from '@breadstone/ziegel-intl';

Issues ​

Please report bugs and feature requests in the Issue Tracker.

Released under the MIT License.