PHPackages                             la-haute-societe/craft-locale-selector - 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. la-haute-societe/craft-locale-selector

ActiveCraft-plugin[Localization &amp; i18n](/categories/localization)

la-haute-societe/craft-locale-selector
======================================

A Craft field type for selecting a site or a country

2.0.0(4mo ago)03232[1 issues](https://github.com/la-haute-societe/craft-locale-picker/issues)[1 PRs](https://github.com/la-haute-societe/craft-locale-picker/pulls)proprietaryPHP

Since Jun 29Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/la-haute-societe/craft-locale-picker)[ Packagist](https://packagist.org/packages/la-haute-societe/craft-locale-selector)[ RSS](/packages/la-haute-societe-craft-locale-selector/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

Craft - Locale selector
=======================

[](#craft---locale-selector)

This plugin adds a new "Country or Site" field type to the Craft CMS. The Country or site field allows content editors to choose from a list of link types and offers individual input fields for each of them.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 5.0.0 or later and PHP 8.2+.

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

[](#installation)

The plugin can be installed from the integrated plugin store by searching for "Locale selector" or using Composer:

1. Open your terminal and navigate to your Craft project: ```
    cd /path/to/project
    ```
2. Then tell Composer to load the plugin: ```
    composer require la-haute-societe/craft-locale-selector
    ```
3. Finally, install and enable the plugin: ```
    ./craft plugin/install locale-selector
    ./craft plugin/enable locale-selector
    ```

Usage
-----

[](#usage)

After the plugin has been installed, "Country or site" fields can be created using the field settings within the control panel. All field settings can be found within the field manager.

Templating
----------

[](#templating)

### Countries

[](#countries)

Country fields can be rendered directly in Twig, they return the localized name of the selected country.

```
{{ entry.myCountryField }}
```

The field value is actually an instance of `\lhs\craft\localeSelectorField\models\CountryModel` which exposes additional properties and methods that can be used in templates.

### Sites

[](#sites)

Site fields can be rendered directly in Twig, they return the name of the site.

```
{{ entry.mySiteField }}
```

The field value is actually an instance of `\craft\models\Site` which exposes additional properties and methods that can be used in templates.

GraphQL
-------

[](#graphql)

GraphQL is supported 🎉

### Sites

[](#sites-1)

Sites expose the following properties:

- `id` - `[string]`: The ID of the site
- `name` - `[string]`: The name of the site
- `language` - `[string]`: The language code of the site as selected in the CP (example: `fr-FR` or `en`)
- `baseUrl` - `[string]`: The site base URL
- `handle` - `[string]`: The site handle

### Countries

[](#countries-1)

Countries expose the following properties:

- `name` - `[string]`: The localized name of the country
- `nativeName` - `[string]`: The name of the country, in the country main language
- `iso2` - `[string]`: The 2-letter country code, according to [ISO 3166](https://www.iso.org/iso-3166-country-codes.html)
- `iso3` - `[string]`: The 3-letter country code, according to [ISO 3166](https://www.iso.org/iso-3166-country-codes.html)

Roadmap
-------

[](#roadmap)

- Add the ability to select languages
- Add the ability to select locales (language + country)

Brought to you by [![Logo La Haute Société](.readme/logo-lahautesociete.png)](https://www.lahautesociete.com)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance76

Regular maintenance activity

Popularity13

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~445 days

Total

4

Last Release

129d ago

Major Versions

1.0.0 → 2.0.02026-02-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fd1947ef8f9b4e7b6f1782c87ade771ff646d15941f6e5347605bdf16fada71?d=identicon)[la-haute-societe](/maintainers/la-haute-societe)

![](https://avatars.githubusercontent.com/u/353843?v=4)[nstcactus](/maintainers/nstcactus)[@nstcactus](https://github.com/nstcactus)

---

Top Contributors

[![nstcactus](https://avatars.githubusercontent.com/u/353843?v=4)](https://github.com/nstcactus "nstcactus (10 commits)")[![nstCactus](https://avatars.githubusercontent.com/u/353843?v=4)](https://github.com/nstCactus "nstCactus (10 commits)")[![Jose-Ferreira-LHS](https://avatars.githubusercontent.com/u/263881028?v=4)](https://github.com/Jose-Ferreira-LHS "Jose-Ferreira-LHS (5 commits)")

---

Tags

cmsfieldcountryCraftcraftcmscraft-pluginsitefield type

### Embed Badge

![Health badge](/badges/la-haute-societe-craft-locale-selector/health.svg)

```
[![Health](https://phpackages.com/badges/la-haute-societe-craft-locale-selector/health.svg)](https://phpackages.com/packages/la-haute-societe-craft-locale-selector)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[acclaro/translations

Easily launch and manage multilingual Craft websites without having to copy/paste content or manually track updates.

1329.6k](/packages/acclaro-translations)[verbb/events

A full-featured plugin for event management and ticketing.

2311.9k](/packages/verbb-events)

PHPackages © 2026

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