|
2 | 2 |
|
3 | 3 | [](https://www.npmjs.com/package/lit-localize) [](https://github.com/PolymerLabs/lit-localize/actions?query=workflow%3Atests+branch%3Amaster+event%3Apush)
|
4 | 4 |
|
5 |
| -<img src="./rgb_lit.png" height="100" align="right"></img> |
| 5 | +<img src="./rgb_lit.png" width="150" height="100" align="right"></img> |
6 | 6 |
|
7 | 7 | ###### [API](#api) | [Tutorial](#tutorial) | [API](#api)
|
8 | 8 |
|
|
13 | 13 |
|
14 | 14 | - 🌐 Localize your lit-html and LitElement applications
|
15 | 15 | - 🔥 Safely embed HTML markup within localized templates
|
| 16 | +- 🍦 Write vanilla code that works in development with no new tooling |
16 | 17 | - 📄 Standard XLIFF interchange format
|
17 | 18 | - 🆓 Generate a zero-overhead bundle for each locale
|
18 | 19 | - 🔁 ... or dynamically load locales and automatically re-render
|
|
54 | 55 | function. The first argument is a unique identifier for this template, and
|
55 | 56 | the second is a string or lit-html template.
|
56 | 57 |
|
| 58 | + (Note that this code will directly compile and run, just as it would if you |
| 59 | + were rendering the lit template directly, so your build process doesn't need |
| 60 | + to change until you want to integrate localized templates.) |
| 61 | + |
57 | 62 | ```typescript
|
58 | 63 | import {html, render} from 'lit-html';
|
59 | 64 | import {msg} from 'lit-localize';
|
|
66 | 71 |
|
67 | 72 | 4. Make a JSON config file at the root of your project called
|
68 | 73 | `lit-localize.json`. In this example we're using _transform_ mode, but you
|
69 |
| - can also use _runtime_ mode. |
| 74 | + can also use _runtime_ mode. The `$schema` property is optional, and lets |
| 75 | + editors like VSCode auto-complete and check for errors. |
70 | 76 |
|
71 | 77 | ```json
|
72 | 78 | {
|
|
0 commit comments