@furystack/i18n 1.0.20 → 1.0.21

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/README.md CHANGED
@@ -20,7 +20,7 @@ You can then use the service to translate strings:
20
20
  ```ts
21
21
  import { I18NService } from '@furystack/i18n'
22
22
 
23
- const service = injector.get(I18NService)
23
+ const service = injector.getInstance(I18NService)
24
24
 
25
25
  console.log(service.translate('hello')) // Outputs: 'Hello'
26
26
  ```
@@ -20,7 +20,7 @@ export declare class I18NService<Keys extends string> extends EventHub<{
20
20
  */
21
21
  registerLanguage(language: PartialLanguage<Keys>): void;
22
22
  /**
23
- *
23
+ * Translates a key to the corresponding value in the specified language
24
24
  * @param key The translation key
25
25
  * @param languageCode An optional language code, will fall back to the current language code if not provided
26
26
  * @returns The translation for the given key in the given language. If the language is not found or does not contain the key, the translation from the default language will be returned.
@@ -46,7 +46,7 @@ let I18NService = class I18NService extends EventHub {
46
46
  this.additionalLanguages.push(language);
47
47
  }
48
48
  /**
49
- *
49
+ * Translates a key to the corresponding value in the specified language
50
50
  * @param key The translation key
51
51
  * @param languageCode An optional language code, will fall back to the current language code if not provided
52
52
  * @returns The translation for the given key in the given language. If the language is not found or does not contain the key, the translation from the default language will be returned.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@furystack/i18n",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Generic package for i18n",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -35,8 +35,8 @@
35
35
  },
36
36
  "homepage": "https://github.com/furystack/furystack",
37
37
  "dependencies": {
38
- "@furystack/inject": "^12.0.21",
39
- "@furystack/utils": "^8.1.3"
38
+ "@furystack/inject": "^12.0.22",
39
+ "@furystack/utils": "^8.1.4"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^24.7.2",
@@ -51,7 +51,7 @@ export class I18NService<Keys extends string> extends EventHub<{ languageChange:
51
51
  }
52
52
 
53
53
  /**
54
- *
54
+ * Translates a key to the corresponding value in the specified language
55
55
  * @param key The translation key
56
56
  * @param languageCode An optional language code, will fall back to the current language code if not provided
57
57
  * @returns The translation for the given key in the given language. If the language is not found or does not contain the key, the translation from the default language will be returned.