lingo.dev 0.93.7 → 0.93.8

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
@@ -5,7 +5,7 @@
5
5
  </p>
6
6
 
7
7
  <p align="center">
8
- <strong>⚡️ AI-powered, open-source i18n toolkit for instant localization with LLMs.</strong>
8
+ <strong>⚡ Lingo.dev - open-source, AI-powered i18n toolkit for instant localization with LLMs.</strong>
9
9
  </p>
10
10
 
11
11
  <br />
@@ -35,22 +35,28 @@
35
35
 
36
36
  **Lingo.dev Compiler** is a free, open-source compiler middleware, designed to make any React app multilingual at build time without requiring any changes to the existing React components.
37
37
 
38
+ Install once:
39
+
38
40
  ```bash
39
- # install once
40
41
  npm install lingo.dev
42
+ ```
43
+
44
+ Enable in your build config:
41
45
 
42
- # next.config.js
46
+ ```js
43
47
  import lingoCompiler from "lingo.dev/compiler";
44
48
 
49
+ const existingNextConfig = {};
50
+
45
51
  export default lingoCompiler.next({
46
52
  sourceLocale: "en",
47
53
  targetLocales: ["es", "fr"],
48
- });
54
+ })(existingNextConfig);
49
55
  ```
50
56
 
51
57
  Run `next build` and watch Spanish and French bundles pop out ✨
52
58
 
53
- [Read the docs →](https://lingo.dev/compiler) for the full guide.
59
+ [Read the docs →](https://lingo.dev/compiler) for the full guide, and [Join our Discord](https://lingo.dev/go/discord) to get help with your setup.
54
60
 
55
61
  ---
56
62
 
@@ -72,12 +78,12 @@ Below are the quick hits for each 👇
72
78
  Translate code & content straight from your terminal.
73
79
 
74
80
  ```bash
75
- npx lingo.dev@latest i18n
81
+ npx lingo.dev@latest run
76
82
  ```
77
83
 
78
84
  It fingerprints every string, caches results, and only re-translates what changed.
79
85
 
80
- [Read the docs →](https://lingo.dev/cli)
86
+ [Follow the docs →](https://lingo.dev/cli) to learn how to set it up.
81
87
 
82
88
  ---
83
89
 
@@ -111,10 +117,24 @@ Keeps your repo green and your product multilingual without the manual steps.
111
117
  Instant per-request translation for dynamic content.
112
118
 
113
119
  ```ts
114
- import { translate } from "lingo.dev/sdk";
120
+ import { LingoDotDevEngine } from "lingo.dev/sdk";
121
+
122
+ const lingoDotDev = new LingoDotDevEngine({
123
+ apiKey: "your-api-key-here",
124
+ });
125
+
126
+ const content = {
127
+ greeting: "Hello",
128
+ farewell: "Goodbye",
129
+ message: "Welcome to our platform",
130
+ };
131
+
132
+ const translated = await lingoDotDev.localizeObject(content, {
133
+ sourceLocale: "en",
134
+ targetLocale: "es",
135
+ });
136
+ // Returns: { greeting: "Hola", farewell: "Adiós", message: "Bienvenido a nuestra plataforma" }
115
137
 
116
- const text = await translate("Hello world", { to: "es" });
117
- // → "¡Hola mundo!"
118
138
  ```
119
139
 
120
140
  Perfect for chat, user comments, and other real-time flows.
package/build/cli.cjs CHANGED
@@ -7386,7 +7386,7 @@ async function renderHero2() {
7386
7386
  // package.json
7387
7387
  var package_default = {
7388
7388
  name: "lingo.dev",
7389
- version: "0.93.7",
7389
+ version: "0.93.8",
7390
7390
  description: "Lingo.dev CLI",
7391
7391
  private: false,
7392
7392
  publishConfig: {