import { type Locale, type ISO639_1LanguageCode, type BCP47Locale, type InferBCP47Locale, type InferPosixFromBCP47Locale, type CountryCode } from './locales.js'; /** * Checks whether the provided value is a valid `ISO 639-1` language code. * A valid `ISO 639-1` code is a two-letter code representing a language (e.g., "en" for English). * * @param value - The string to check. * @returns True if the value is a valid `ISO 639-1` language code, false otherwise. */ export declare function isISO639_1LanguageCode(value: string | undefined): value is ISO639_1LanguageCode; /** * Converts a given Locale to its corresponding `ISO 639-1` language code. * * @param locale - The Locale to convert (e.g., `en_US`). * @returns The ISO 639-1 language code (e.g., `"en"`). */ export declare function toISO639_1LanguageCode(locale: Locale): ISO639_1LanguageCode; /** * Converts an `ISO 639-1` language code to a corresponding Locale. * If multiple Locales exist for the same language code, the first match is returned. * * @param languageCode - The `ISO 639-1` language code (e.g., `"en"`). * @returns The corresponding Locale (e.g., `en_US`), or null if not found. */ export declare function iso639_1ToLocale(languageCode: ISO639_1LanguageCode): Locale; /** * Checks whether the provided value is a valid `BCP 47` locale string. * A valid `BCP 47` locale string follows the format "language-region" (e.g., "en-US"). * * @param value - The string to check. * @returns True if the value is a valid `BCP 47` locale string, false otherwise. */ export declare function isBCP47Locale(value: string | undefined): value is BCP47Locale; /** * Converts a POSIX locale string (used in Unix-like systems, e.g., `"en_US"`) * to `BCP 47` (Best Common Practice for Language Tags, e.g., `"en-US"`) format. * * @param posixLocale - The POSIX locale string (e.g., `"en_US"`). * @returns The `BCP 47` locale string (e.g., `"en-US"`). */ export declare function toBCP47(posixLocale: TLocale): InferBCP47Locale; /** * Converts a `BCP 47` (Best Common Practice for Language Tags, e.g., `"en-US"`) * locale string to POSIX format (used in Unix-like systems, e.g., `"en_US"`). * * @param locale - The `BCP 47` locale string (e.g., `"en-US"`). * @returns The `POSIX` locale string (e.g., `"en_US"`). */ export declare function toPOSIX(locale: TBCPLocale): InferPosixFromBCP47Locale; /** * Retrieves the human-readable name of a given locale. * * @param locale - The locale string (e.g., `"en_US"` or `"fr-FR"`). * @returns The human-readable name of the locale (e.g., `"English (United States)"` or `"French (France)"`). */ export declare function getLocaleName(locale: Locale): string; /** * Extracts the country/region code from a given locale string. * * @param locale - The locale string (e.g., `"en_US"` or `"fr-FR"`). * @returns The `ISO 3166-1 alpha-2` country/region code (e.g., `"US"` or `"FR"`), or null if not found. */ export declare function getCountryFromLocale(locale: Locale): CountryCode | null; /** * Type guard to check if a value is a valid Locale. */ export declare function isLocale(value: string | undefined): value is Locale;