Laravel PHP strings

Changed in version 4.1.

The Laravel PHP localization files are supported as well with plurals:

Changed in version 5.15: The translation keys no longer include PHP structure and only contain the actual key.

<?php
return [
    'welcome' => 'Welcome to our application',
    'apples' => 'There is one apple|There are many apples',
];
Supported features

File extensions

.php

Linguality ⓘ

Monolingual

Supports plural ⓘ

Yes

Supports descriptions ⓘ

Yes

Supports explanation ⓘ

No

Supports context ⓘ

No

Supports location ⓘ

No

Supports flags ⓘ

No

API identifier

laravel

Supports read-only strings ⓘ

No

Supports removing obsolete strings ⓘ

No

Check flags added by this format ⓘ

Laravel format

Weblate configuration

Typical Weblate Component configuration

File mask

lang/*/texts.php

Monolingual base language file

lang/en/texts.php

Template for new translations

lang/en/texts.php

File format

Laravel PHP strings