Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto committed Oct 1, 2024
1 parent a41a39a commit 0833113
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions slang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ dart run slang migrate arb src.arb dest.json # migrate arb to json

Coming from ARB? There is a [tool](#arb) for that.

Are you using Slang without Flutter? Check out the [Dart only](#-dart-only) section.

**Step 1: Add dependencies**

You will probably need at least 2 packages: [slang](https://pub.dev/packages/slang) and [slang_flutter](https://pub.dev/packages/slang_flutter).
Expand Down Expand Up @@ -709,15 +711,14 @@ If namespaces are used, then it has to be specified in the path too.

[RichTexts](#-richtext) can also contain links! But only [RichTexts](#-richtext) can link to [RichTexts](#-richtext).

Optionally, you can escape linked translations with this syntax:

Optionally, you can escape linked translations by surrounding the path with `{}`:

```json
{
"fields": {
"nbsp": "\u00a0"
"name": "my name is {firstName}"
},
"message": "10@:{fields.nbsp}Days"
"introduce": "Hello, @:{fields.name}inator"
}
```

Expand Down Expand Up @@ -1397,6 +1398,12 @@ An experienced reverse engineer can still find the strings given enough time.

You can use this library without flutter.

```yaml
# pubspec.yaml
dependencies:
slang: <version>
```

```yaml
# Config
flutter_integration: false # set this
Expand Down

0 comments on commit 0833113

Please sign in to comment.