Skip to content

Commit

Permalink
chore: remove comments from json
Browse files Browse the repository at this point in the history
  • Loading branch information
danjohnson95 committed Aug 5, 2024
1 parent c1e45f6 commit 815a40f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ This package makes Laravel's translation work in tandem with frontend localisati
Normally, your Laravel translation strings that interpolate variables would look like this:

```json
// resources/lang/en.json
{
"greeting": "Welcome, :name!"
}
Expand All @@ -23,7 +22,6 @@ Normally, your Laravel translation strings that interpolate variables would look
But with this package, you can also define your translation strings like this:

```json
// resources/lang/en.json
{
"greeting": "Welcome, {{name}}!"
}
Expand All @@ -34,7 +32,6 @@ Meaning you can share that same translation string with your frontend localisati
It works for pluralisation too. Laravel usually expects pluralisation strings to be delimited by a pipe character, like this:

```json
// resources/lang/en.json
{
"apples": "There is one apple|There are many apples"
}
Expand All @@ -43,7 +40,6 @@ It works for pluralisation too. Laravel usually expects pluralisation strings to
But with this package, you can also define your pluralisation strings like this:

```json
// resources/lang/en.json
{
"apples_one": "There is one apple",
"apples_other": "There are many apples"
Expand All @@ -65,7 +61,6 @@ composer require danjohnson95/laravel-i18n-compatibility
In Laravel, you can use your localisation strings exactly as you would normally.

```json
// resources/lang/en.json
{
"greeting": "Welcome, {{name}}!",
"apples_one": "There is one apple",
Expand All @@ -74,7 +69,6 @@ In Laravel, you can use your localisation strings exactly as you would normally.
```

```php
// app/Http/Controllers/ExampleController.php
public function index()
{
return response()->json([
Expand Down

0 comments on commit 815a40f

Please sign in to comment.