https://github.com/uiwebkit/localize
Uni Localize
https://github.com/uiwebkit/localize
custom-elements html javascript languages localization localizations localize micro-frontend microfrontend stencil stenciljs translate translation typescript web web-components webcomponents widget
Last synced: 6 months ago
JSON representation
Uni Localize
- Host: GitHub
- URL: https://github.com/uiwebkit/localize
- Owner: uiwebkit
- License: mit
- Created: 2021-09-14T10:24:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-24T08:00:04.000Z (over 3 years ago)
- Last Synced: 2025-10-06T16:03:11.603Z (6 months ago)
- Topics: custom-elements, html, javascript, languages, localization, localizations, localize, micro-frontend, microfrontend, stencil, stenciljs, translate, translation, typescript, web, web-components, webcomponents, widget
- Language: HTML
- Homepage: https://uiwebkit.com/wgt/loc/2/
- Size: 1.3 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://www.webcomponents.org/element/@uiwebkit/loc)
```html
This content is localized
```
# Uni Localize
Uni Localize is a set of Web Components & Custom Elements for adding multilingual support to your website and customize it in the declarative style.
Uni Localize components have three modes:
1. Custom Element - `100%` convenience;
2. Web Component - `100%` security;
3. Custom Element with 'only' prop - `100%` customization;
Uni Localize takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components & Custom Elements that run in any browser supporting the Custom Elements v1 spec.
Uni Localize components are just HTML Web Components & Custom Elements, so they work in any major framework or with no framework at all.
## Getting Started
Clone this repo to a new directory:
```bash
git clone https://github.com/uiwebkit/localize.git uni-localize
cd uni-localize
```
and run:
```bash
npm i
npm run serve:dev
```
To build the component for production, run:
```bash
npm run build:prod
```
Check out our docs [here](https://uiwebkit.com/wgt/loc/2/).
## Naming Components
When creating new component tags, use `uni` in the component name (ex: ``) or use a prefix that fits your company or any name for a group of related components. For example, all the UiWebKit generated Web Components & Custom Elements use the prefix `uni`.
## Using Components
There are two strategies we recommend for using Uni Localization:
### Script tag
- Put a script tag `` in the head of your index.html
- Then you can use web components and custom elements anywhere in your Template, JSX, HTML, etc.;
### Node Modules
- Run `npm i @uiwebkit/loc --save`;
- Paste `import @uiwebkit/loc;` into the main JS/TS file;
- Then you can use web components and custom elements anywhere in your Template, JSX, HTML, etc.;