PHPackages                             oblik/kirby-variables - 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. oblik/kirby-variables

Abandoned → [bnomei/autoloader-for-kirby](/?search=bnomei%2Fautoloader-for-kirby)ArchivedKirby-plugin[Localization &amp; i18n](/categories/localization)

oblik/kirby-variables
=====================

Easy language variable management in YAML files for Kirby.

2.2.0(6y ago)9772↓91.7%1MITPHP

Since Mar 13Pushed 3y ago2 watchersCompare

[ Source](https://github.com/OblikStudio/kirby-variables)[ Packagist](https://packagist.org/packages/oblik/kirby-variables)[ RSS](/packages/oblik-kirby-variables/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (8)Dependencies (3)Versions (10)Used By (1)

kirby-variables
===============

[](#kirby-variables)

Allows you to easily manage language variables by putting them in separate YAML files and nesting them.

⚠ Deprecated!
-------------

[](#-deprecated)

By putting variables in separate files, you aren't really gaining much. You'd be much better off having a "variables" or "texts" tab in your `site.yml` and just putting simple `text` fields in there, optionally with help text, placeholder, etc.

If you really need to load variables from a file, you could do it like this:

```
'translations' => Yaml::decode(F::read(kirby()->root('languages') . '/vars/en.yml'))
```

Or, alternatively, you could use [bnomei/autoloader-for-kirby](https://github.com/bnomei/autoloader-for-kirby).

Installation
============

[](#installation)

With [Composer](https://packagist.org/packages/oblik/kirby-variables):

```
composer require oblik/kirby-variables

```

Usage
=====

[](#usage)

After you've installed the plugin and you open your site, the plugin will run and it will automatically get the variables from your PHP files and put them in YAML files in the same directory. After that, you can remove the variables from your PHP files, as they're no longer needed. Then, use the YAML files to manage your variables.

Your variables should continue to work as they did so far. In the YAML file, nested arrays are flattened and their keys are concatenated with a period (`.`). For example, the following:

```
foo:
  bar: test
  baz:
    qux: test2
```

...is converted to:

```
Array
(
    [foo.bar] => test
    [foo.baz.qux] => test2
)

```

...and you can use the variables in your templates with `t('foo.baz.qux')`.

Config
------

[](#config)

### `folder`

[](#folder)

Sets where the YAML files are stored:

```
'oblik.variables.folder' => function ($kirby) {
    return $kirby->root('content') . '/_variables';
}
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~66 days

Total

8

Last Release

2345d ago

Major Versions

1.1.1 → 2.0.02019-08-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/078077710a1481f0419521ab1e1d3e5f93723aadd56148937ee3e355b93acb2e?d=identicon)[hdodov](/maintainers/hdodov)

---

Top Contributors

[![yandodov](https://avatars.githubusercontent.com/u/5570098?v=4)](https://github.com/yandodov "yandodov (36 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/oblik-kirby-variables/health.svg)

```
[![Health](https://phpackages.com/badges/oblik-kirby-variables/health.svg)](https://phpackages.com/packages/oblik-kirby-variables)
```

###  Alternatives

[getkirby/cms

The Kirby core

1.5k567.4k433](/packages/getkirby-cms)[johannschopplich/kirby-content-translator

DeepL &amp; AI-powered content translation for Kirby CMS

2010.1k](/packages/johannschopplich-kirby-content-translator)[medienbaecker/kirby-modules

Easily add modules to your pages

895.4k1](/packages/medienbaecker-kirby-modules)[junohamburg/kirby-language-selector

Kirby Language Selector

609.8k1](/packages/junohamburg-kirby-language-selector)[mullema/k3-panel-view-extended

Allow single language pages/site/users in a multi language setup, hide buttons in topbar and sections.

278.2k1](/packages/mullema-k3-panel-view-extended)[sietseveenman/kirby3-language-sync

Synchronize page content from one language to another

163.8k](/packages/sietseveenman-kirby3-language-sync)

PHPackages © 2026

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