1
- # fluent- syntax
1
+ # @ fluent/ syntax
2
2
3
- ` fluent- syntax ` is a parser for Fluent translation files, FTL. Project Fluent
4
- is a localization framework designed to unleash the expressive power of the
5
- natural language.
3
+ ` @ fluent/ syntax` is a parser for Fluent translation files, FTL. Project
4
+ Fluent is a localization framework designed to unleash the expressive power
5
+ of the natural language.
6
6
7
7
8
8
## Installation
9
9
10
- ` fluent- syntax ` can be used both on the client-side and the server-side. You
10
+ ` @ fluent/ syntax` can be used both on the client-side and the server-side. You
11
11
can install it from the npm registry or use it as a standalone script (as the
12
12
` FluentSyntax ` global).
13
13
14
- npm install fluent- syntax
14
+ npm install @ fluent/ syntax
15
15
16
16
17
17
## How to use
18
18
19
19
``` javascript
20
- import { parse , Resource } from ' fluent- syntax' ;
20
+ import {parse , Resource } from " @ fluent/ syntax" ;
21
21
22
22
const res = parse (`
23
- brand-name = Foo 3000
24
- welcome = Welcome, { $name }, to { brand-name }!
23
+ - brand-name = Foo 3000
24
+ welcome = Welcome, {$name}, to {- brand-name}!
25
25
` );
26
26
27
27
assert (res instanceof Resource);
28
28
```
29
29
30
30
The API reference is available at
31
- http://projectfluent.org/fluent.js/fluent- syntax .
31
+ http://projectfluent.org/fluent.js/syntax .
32
32
33
33
34
34
## Compatibility
@@ -37,7 +37,7 @@ For legacy browsers, the `compat` build has been transpiled using Babel's [env
37
37
preset] [ ] :
38
38
39
39
``` javascript
40
- import ' fluent- syntax/compat' ;
40
+ import " @ fluent/ syntax/compat" ;
41
41
```
42
42
43
43
0 commit comments