# aitomic-m-lang

> A template of language switcher. Import {latte} block in '@layout.default.latte' using macro `{import '../path-to-latte-template'}` and declare this block as `{include #m-lang}`. Between macros `{import}` and `{include}` redefine template of used blocks

Latest version **2.0.0** (published 2024-10-14) · SEE LICENSE IN license.txt license · 0 weekly downloads

## Install

```sh
npm install aitomic-m-lang
pnpm add aitomic-m-lang
yarn add aitomic-m-lang
bun add aitomic-m-lang
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2024-10-14 |
| First published | 2019-01-19 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN license.txt |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aitom Digital s.r.o. |
| Maintainers | aitom |

## Links

- npm: https://www.npmjs.com/package/aitomic-m-lang
- npm.io page: https://npm.io/package/aitomic-m-lang

## Dependencies (1)

- [aitomic-base](https://npm.io/package/aitomic-base.md) ^2.0.0

## Recent versions

- 2.0.0 (latest) — 2024-10-14
- 1.0.1 — 2019-02-13
- 1.0.0 — 2019-01-19

## README

A template of language switcher.  Import {latte} block in '@layout.default.latte' using macro `{import '../path-to-latte-template'}` and declare this block as `{include #m-lang}`. Between macros `{import}` and `{include}` redefine template of used blocks like this:

```html
{block #itemName}
	<span class="m-lang__name">{$mutation->name}</span>
{/block}

{block #control}
	<label for="language-status" class="m-lang__link m-lang__control">
		{include #itemName, mutation => $lang}
	</label>
{/block}
```
Take a look at source of {latte} template to discover available hooks to customization.

Optionally set variables for CSS classes of list, item and link:

```html
{include #m-lang, componentClass => '', itemClass => '', linkClass => ''}
```

---
_Source: https://npm.io/package/aitomic-m-lang · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
