PHPackages                             samosadlaker/statamic-langtag - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. samosadlaker/statamic-langtag

ActiveStatamic-addon[Localization &amp; i18n](/categories/localization)

samosadlaker/statamic-langtag
=============================

Statamic LangTag addon

v1.0.2(8mo ago)011MITPHPCI passing

Since Sep 3Pushed 8mo agoCompare

[ Source](https://github.com/SamoSadlaker/statamic-langtag)[ Packagist](https://packagist.org/packages/samosadlaker/statamic-langtag)[ RSS](/packages/samosadlaker-statamic-langtag/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Statamic Langtag
================

[](#statamic-langtag)

[![last tag](https://camo.githubusercontent.com/a8bfe6976ca3aa5cf6acdb93228d71afa964b3c71addc968af2038fa7b224938/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f73616d6f7361646c616b65722f73746174616d69632d6c616e677461673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/a8bfe6976ca3aa5cf6acdb93228d71afa964b3c71addc968af2038fa7b224938/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f73616d6f7361646c616b65722f73746174616d69632d6c616e677461673f7374796c653d666c61742d737175617265)

Statamic Langtag is a Statamic CMS addon that simplifies multi-language content handling. It provides a custom tag for managing locale-specific content blocks and routes to switch between supported languages. This addon is especially useful for Statamic sites with multiple locales, helping you easily display content in different languages based on user selection or session.

Features
--------

[](#features)

- Custom Statamic tag (`{{ lang_tag }}` and alias `{{ lt }}`) for rendering language-specific content
- Configuration for default and supported locales (e.g., 'sk', 'en')
- Web route for switching locales via URL (`/lang/{locale}`)
- Automatically sets and remembers the user's locale in the session
- Easy integration with Statamic templates

Installation
------------

[](#installation)

Install via Composer:

```
composer require samosadlaker/statamic-langtag
```

Configuration
-------------

[](#configuration)

Publish the config file to customize locales:

```
php artisan vendor:publish --tag=statamic-langtag
```

Edit `config/statamic/langtag.php`:

```
return [
  'default' => 'sk',
  'supported' => ['sk', 'en'],
];
```

Usage
-----

[](#usage)

### Switch Locale

[](#switch-locale)

Navigate to `/lang/{locale}` to switch to a supported locale. For example: `/lang/en` or `/lang/sk`.

### Template Tag

[](#template-tag)

Use in your Antlers templates:

```
{{ lang_tag default="Ahoj" en="Hello" }}
```

Using antlers variable

```
{{ lang_tag default="{title}" en="{en_title}" }}
```

This will display the string based on the current locale, using 'default' if no match.

### Check locale

[](#check-locale)

Conditions for checking current locale

```
{{ {lang_tag:is locale="en"} ? 'Yes' : 'No'}}
```

### Alias

[](#alias)

You can also use the alias:

```
{{ lt default="Ahoj" en="Welcome" }}
```

### Fix locale

[](#fix-locale)

```
{{lang_tag:fix }}
```

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance64

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

248d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9664e977f1c42f80dcfa049cd60e5607533954594e4cb6d696f796934f6ecfc6?d=identicon)[SamoSadlaker](/maintainers/SamoSadlaker)

---

Top Contributors

[![SamoSadlaker](https://avatars.githubusercontent.com/u/57994049?v=4)](https://github.com/SamoSadlaker "SamoSadlaker (8 commits)")

### Embed Badge

![Health badge](/badges/samosadlaker-statamic-langtag/health.svg)

```
[![Health](https://phpackages.com/badges/samosadlaker-statamic-langtag/health.svg)](https://phpackages.com/packages/samosadlaker-statamic-langtag)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.0k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M491](/packages/illuminate-translation)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
