mn-angular-lib 0.0.53 → 0.0.54
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
|
@@ -4230,6 +4230,8 @@ interface MnLanguageConfig {
|
|
|
4230
4230
|
* Example: { "example.nl": "nl", "example.de": "de", "example.com": "en" }
|
|
4231
4231
|
*/
|
|
4232
4232
|
domainLocaleMap?: Record<string, string>;
|
|
4233
|
+
/** Whether to enable debug logging. */
|
|
4234
|
+
debug?: boolean;
|
|
4233
4235
|
}
|
|
4234
4236
|
/**
|
|
4235
4237
|
* Type guard: checks whether a value is a translatable marker object.
|
|
@@ -4241,11 +4243,16 @@ declare class MnLanguageService {
|
|
|
4241
4243
|
private _translations;
|
|
4242
4244
|
private _locale$;
|
|
4243
4245
|
private _urlPattern;
|
|
4246
|
+
private _debug;
|
|
4244
4247
|
/** Observable of the current active locale. */
|
|
4245
4248
|
readonly locale$: Observable<string>;
|
|
4246
4249
|
constructor(http: HttpClient);
|
|
4247
4250
|
/** Current active locale. */
|
|
4248
4251
|
get locale(): string;
|
|
4252
|
+
/**
|
|
4253
|
+
* Enable or disable debug logging.
|
|
4254
|
+
*/
|
|
4255
|
+
setDebug(enabled: boolean): void;
|
|
4249
4256
|
/**
|
|
4250
4257
|
* Configure the URL pattern used to fetch translation files.
|
|
4251
4258
|
* Use `{locale}` as placeholder, e.g. `"assets/i18n/{locale}.json"`.
|
|
@@ -4271,6 +4278,10 @@ declare class MnLanguageService {
|
|
|
4271
4278
|
* Interpolation replaces `{{paramName}}` with the provided value.
|
|
4272
4279
|
*/
|
|
4273
4280
|
translate(key: string, params?: Record<string, string | number>): string;
|
|
4281
|
+
/**
|
|
4282
|
+
* Helper to retrieve a value from a potentially nested translation map using a dot-notated key.
|
|
4283
|
+
*/
|
|
4284
|
+
private getValueFromMap;
|
|
4274
4285
|
/**
|
|
4275
4286
|
* Shorthand alias for `translate`.
|
|
4276
4287
|
*/
|