@nice2dev/i18n 1.1.6 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.mjs +23771 -10564
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -827,7 +827,12 @@ export declare function pseudoLocalize(text: string, options?: PseudoLocalizatio
|
|
|
827
827
|
*/
|
|
828
828
|
export declare function pseudoLocalizeDictionary(dictionary: Record<string, string>, options?: PseudoLocalizationOptions): Record<string, string>;
|
|
829
829
|
|
|
830
|
-
/**
|
|
830
|
+
/**
|
|
831
|
+
* Resolve a register-aware dictionary by locale + variant.
|
|
832
|
+
*
|
|
833
|
+
* Reads `pl` from its own module rather than through the aggregate, so this
|
|
834
|
+
* function pulls one language instead of all thirty.
|
|
835
|
+
*/
|
|
831
836
|
export declare function resolvePlVariant(variant: NiceI18nVariant): Record<string, string>;
|
|
832
837
|
|
|
833
838
|
/**
|
|
@@ -1009,7 +1014,7 @@ export declare function useDynamicI18n(): DynamicI18nContextValue;
|
|
|
1009
1014
|
export declare function useDynamicTranslation(namespace?: string): {
|
|
1010
1015
|
t: (key: string, params?: Record<string, string | number>) => string;
|
|
1011
1016
|
isLoading: boolean;
|
|
1012
|
-
currentLanguage: "
|
|
1017
|
+
currentLanguage: "no" | "de" | "en" | "pl" | "fr" | "es" | "it" | "pt" | "nl" | "sv" | "da" | "fi" | "cs" | "sk" | "hu" | "ro" | "bg" | "uk" | "ja" | "ko" | "zh" | "ar" | "hi" | "bn" | "th" | "vi" | "id" | "sw" | "fil" | "ms";
|
|
1013
1018
|
};
|
|
1014
1019
|
|
|
1015
1020
|
/**
|
|
@@ -1037,9 +1042,16 @@ export declare function useNiceNumberFormat(lang: NiceSupportedLang): NiceNumber
|
|
|
1037
1042
|
*/
|
|
1038
1043
|
export declare function useNiceTimeFormat(lang: NiceSupportedLang, style?: DateFormatStyle): NiceTimeFormatter;
|
|
1039
1044
|
|
|
1040
|
-
/**
|
|
1045
|
+
/**
|
|
1046
|
+
* Internal hook used by Nice2Dev UI components.
|
|
1047
|
+
*
|
|
1048
|
+
* `lang` is the language the nearest provider was given ('en' with no provider). Pass it to
|
|
1049
|
+
* `Intl` / `toLocaleDateString` instead of `undefined`, which uses the browser's language and
|
|
1050
|
+
* can disagree with the language the rest of the interface is in.
|
|
1051
|
+
*/
|
|
1041
1052
|
export declare function useNiceTranslation(): {
|
|
1042
1053
|
t: NiceTranslateFn;
|
|
1054
|
+
lang: NiceSupportedLang;
|
|
1043
1055
|
};
|
|
1044
1056
|
|
|
1045
1057
|
/**
|