|
1 | | -# auto-dom-i18n |
| 1 | +# auto-html-i18n |
2 | 2 |
|
3 | | -[](https://www.npmjs.com/package/auto-dom-i18n) |
4 | | -[](https://github.com/gabepri/auto-dom-i18n/actions) |
5 | | -[](https://github.com/gabepri/auto-dom-i18n/blob/main/LICENSE) |
| 3 | +[](https://www.npmjs.com/package/auto-html-i18n) |
| 4 | +[](https://github.com/gabepri/auto-html-i18n/actions) |
| 5 | +[](https://github.com/gabepri/auto-html-i18n/blob/main/LICENSE) |
6 | 6 |
|
7 | | -**auto-dom-i18n** is a framework-agnostic translation library that uses `MutationObserver` to automatically translate text content in your application, with built-in ICU MessageFormat support for advanced pluralization and gender handling. |
| 7 | +**auto-html-i18n** is a framework-agnostic translation library that uses `MutationObserver` to automatically translate text content in your application, with built-in ICU MessageFormat support for advanced pluralization and gender handling. |
8 | 8 |
|
9 | 9 | It features **Smart Masking**, **Inline Tag Support**, and **ICU MessageFormat** evaluation. Unlike traditional libraries that map static keys to strings, this library observes the DOM and detects natural language automatically—no manual key mapping or framework bindings required. |
10 | 10 |
|
@@ -43,19 +43,19 @@ It features **Smart Masking**, **Inline Tag Support**, and **ICU MessageFormat** |
43 | 43 | ## 📦 Installation |
44 | 44 |
|
45 | 45 | ```bash |
46 | | -npm install auto-dom-i18n |
| 46 | +npm install auto-html-i18n |
47 | 47 | # or |
48 | | -yarn add auto-dom-i18n |
| 48 | +yarn add auto-html-i18n |
49 | 49 | # or |
50 | | -pnpm add auto-dom-i18n |
| 50 | +pnpm add auto-html-i18n |
51 | 51 | ``` |
52 | 52 |
|
53 | 53 | ## 🚀 Quick Start |
54 | 54 |
|
55 | 55 | Initialize the library at the root of your application. |
56 | 56 |
|
57 | 57 | ```javascript |
58 | | -import { I18nObserver } from 'auto-dom-i18n'; |
| 58 | +import { I18nObserver } from 'auto-html-i18n'; |
59 | 59 |
|
60 | 60 | // 1. Define your configuration |
61 | 61 | const i18n = new I18nObserver({ |
@@ -131,7 +131,7 @@ Each variable includes its auto-detected type (`'ignoreWord'`, `'number'`, `'dat |
131 | 131 |
|
132 | 132 | ## 📡 Backend Requirements |
133 | 133 |
|
134 | | -Since `auto-dom-i18n` is client-side only, you must provide a backend endpoint to perform the actual translation (e.g., database lookup, translation API, and/or an LLM). |
| 134 | +Since `auto-html-i18n` is client-side only, you must provide a backend endpoint to perform the actual translation (e.g., database lookup, translation API, and/or an LLM). |
135 | 135 |
|
136 | 136 | ### Request Format |
137 | 137 | Here is an example of how you might structure the POST body in your callback: |
@@ -527,7 +527,7 @@ const i18n = new I18nObserver({ |
527 | 527 |
|
528 | 528 | ## 🌐 Browser Support |
529 | 529 |
|
530 | | -**auto-dom-i18n** relies on `MutationObserver`, which is supported in all modern browsers: |
| 530 | +**auto-html-i18n** relies on `MutationObserver`, which is supported in all modern browsers: |
531 | 531 |
|
532 | 532 | - Chrome 26+ |
533 | 533 | - Firefox 14+ |
@@ -621,7 +621,7 @@ You can immediately see the DOM structure and reconstruct it for a bug report. |
621 | 621 |
|
622 | 622 | ## 🛠 Framework Integration |
623 | 623 |
|
624 | | -While **auto-dom-i18n** is framework-agnostic, here is how you typically initialize it: |
| 624 | +While **auto-html-i18n** is framework-agnostic, here is how you typically initialize it: |
625 | 625 |
|
626 | 626 | ### How It Works with Frameworks |
627 | 627 |
|
@@ -658,8 +658,8 @@ We welcome contributions! This library is built with TypeScript and uses Vitest |
658 | 658 | 1. **Clone the repo** |
659 | 659 |
|
660 | 660 | ```bash |
661 | | - git clone https://github.com/gabepri/auto-dom-i18n.git |
662 | | - cd auto-dom-i18n |
| 661 | + git clone https://github.com/gabepri/auto-html-i18n.git |
| 662 | + cd auto-html-i18n |
663 | 663 | ``` |
664 | 664 |
|
665 | 665 | 2. **Install dependencies** |
|
0 commit comments