-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now the $default_translation argument can be a different Localizer object; so that if the current localizer cannot find the translation, it will look for its default in the second localizer. Each localizer can have a different localizer object as default.
- Loading branch information
Showing
8 changed files
with
62 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
'secondary_btn_title' => 'No', | ||
'success' => 'Welcome', | ||
'unsuccess' => 'Bye', | ||
'error' => 'Ops', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
return [ | ||
'title' => 'لایت لوکالیزیشن', | ||
'message' => 'سلام عسلم، آمادهای؟', | ||
'primary_btn_title' => 'بله', | ||
'secondary_btn_title' => 'خیر', | ||
'success' => 'خوش اومدی', | ||
'unsuccess' => 'بای', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ | |
|
||
public string $unsuccess = 'Bye'; | ||
|
||
public string $ops = 'Ops'; | ||
|
||
public function message() | ||
{ | ||
$msgs = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
use Nabeghe\LightLocalization\Translator; | ||
|
||
return new class extends Translator { | ||
public string $title = 'لایت لوکالیزیشن'; | ||
|
||
public string $primary_btn_title = 'بله'; | ||
|
||
public string $secondary_btn_title = 'خیر'; | ||
|
||
public string $success = 'خوش اومدی'; | ||
|
||
public string $unsuccess = 'بای'; | ||
|
||
public function message() | ||
{ | ||
$msgs = [ | ||
'سلام عسلم، آمادهای؟', | ||
'هی عزیزم، بریم؟', | ||
'آره عزیزم... با من بیا.', | ||
'سلام عزیزم، برای تفریح آمادهای؟', | ||
'هی عشقم، نظرت در مورد یک ماجراجویی کوچک چیست؟', | ||
'عزیزم، آیا این روز را به یک روز به یاد ماندنی تبدیل کنیم؟', | ||
]; | ||
return $msgs[array_rand($msgs)]; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters