Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
fix issue of empty language property
Browse files Browse the repository at this point in the history
  • Loading branch information
meysampg committed May 24, 2017
1 parent 4d818d0 commit 4f9f5ce
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,20 @@ private function getFBOptions()
[
'dataType' => $this->dataType,
'formData' => $this->{$this->arrayToTypeFunction}($this->data),
'i18n' => [
'locale' => $this->language ? $this->language : 'en-US',
'preloaded' => [
$this->getLanguage() => $this->getMessages()
],
],
'showActionButtons' => $this->showActionButtons,
],
$this->options
);

if ($this->language) {
$this->options['i18n'] = [
'locale' => $this->language,
'preloaded' => [
$this->language => $this->getMessages()
],
];
}

return json_encode($this->options);
}

Expand Down

0 comments on commit 4f9f5ce

Please sign in to comment.