mn-angular-lib 0.0.46 → 0.0.48
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/package.json
CHANGED
|
@@ -3182,6 +3182,12 @@ interface MnLanguageConfig {
|
|
|
3182
3182
|
defaultLocale: string;
|
|
3183
3183
|
/** Locales to preload at bootstrap. */
|
|
3184
3184
|
preload?: string[];
|
|
3185
|
+
/**
|
|
3186
|
+
* Optional mapping of domain hostnames to locale codes.
|
|
3187
|
+
* When set, the service will use the current domain to determine the initial locale.
|
|
3188
|
+
* Example: { "example.nl": "nl", "example.de": "de", "example.com": "en" }
|
|
3189
|
+
*/
|
|
3190
|
+
domainLocaleMap?: Record<string, string>;
|
|
3185
3191
|
}
|
|
3186
3192
|
/**
|
|
3187
3193
|
* Type guard: checks whether a value is a translatable marker object.
|
|
@@ -3227,6 +3233,12 @@ declare class MnLanguageService {
|
|
|
3227
3233
|
* Shorthand alias for `translate`.
|
|
3228
3234
|
*/
|
|
3229
3235
|
t(key: string, params?: Record<string, string | number>): string;
|
|
3236
|
+
/**
|
|
3237
|
+
* Resolve the effective default locale from a domain-to-locale map.
|
|
3238
|
+
* Matches `window.location.hostname` against the map keys.
|
|
3239
|
+
* Returns the mapped locale, or the provided fallback if no match is found.
|
|
3240
|
+
*/
|
|
3241
|
+
resolveLocaleForDomain(domainLocaleMap: Record<string, string> | undefined, fallback: string): string;
|
|
3230
3242
|
static ɵfac: i0.ɵɵFactoryDeclaration<MnLanguageService, never>;
|
|
3231
3243
|
static ɵprov: i0.ɵɵInjectableDeclaration<MnLanguageService>;
|
|
3232
3244
|
}
|