Skip to content

"tt(): Argument #4 ($locale) must be of type ?string, array given, called in /site/plugins/kirby-date-methods/index.php on line 317" #4

@tobimori

Description

@tobimori

I'm running a multi-language setup and this snippet:

CleanShot 2024-02-13 at 17 51 30@2x

always returns an array for me, which results in the error.

My language file looks like this:

<?php

return [
	'code' => 'en',
	'default' => true,
	'direction' => 'ltr',
	'locale' => [
		'LC_ALL' => 'en_US'
	],
	'name' => 'English',
	'translations' => [],
	'url' => '/'
];

Although I tried the following and it didn't work as well:

<?php

return [
	'code' => 'en',
	'default' => true,
	'direction' => 'ltr',
	'locale' => 'en_US',
	'name' => 'English',
	'translations' => [],
	'url' => '/'
];

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions