Skip to content

Commit

Permalink
Evaluate interface language
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedsabil83 committed Oct 10, 2023
1 parent c7089ef commit e017eff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Components/TinyEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TinyEditor extends Field implements Contracts\CanBeLengthConstrained, Cont

protected string $toolbar;

protected string $language;
protected string|\Closure $language;

protected bool $toolbarSticky = false;

Expand Down Expand Up @@ -80,7 +80,7 @@ public function getFileAttachmentsDirectory(): ?string

public function getInterfaceLanguage(): string
{
return match ($this->language) {
return match ($this->evaluate($this->language)) {
'ar' => 'ar',
'az' => 'az',
'bg' => 'bg_BG',
Expand Down Expand Up @@ -262,7 +262,7 @@ public function isSimple(): bool
return (bool) $this->evaluate($this->isSimple);
}

public function language(string $language): static
public function language(string|\Closure $language): static
{
$this->language = $language;

Expand Down

0 comments on commit e017eff

Please sign in to comment.