Skip to content

Commit 71ee94d

Browse files
authored
improved instructions about building localized files (#654)
1 parent 88972ec commit 71ee94d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,10 +1588,22 @@ where `{LANGUAGE_CODE}` is replaced by the
15881588
can be built with `npm run build build-js-fr`. This will create a binary
15891589
`firebaseui__fr.js` in the `dist/` folder.
15901590

1591+
Build names for language codes with underscores, eg. `zh_tw`, `zh_cn`, `pt_pt`
1592+
will be mapped to `zh-TW`, `xh-CN`, `pt-PT`. The underscore will be replaced by
1593+
a hyphen symbol and the subsequent characters will be capitalized.
1594+
1595+
```bash
1596+
npm run build build-js-zh-TW
1597+
```
1598+
1599+
This will create a binary `firebaseui__zh_tw.js` in the `dist/` folder.
1600+
15911601
To build a localized npm FirebaseUI module, run:
1602+
15921603
```bash
15931604
npm run build build-npm-{LANGUAGE_CODE}
15941605
```
1606+
15951607
Make sure all underscore symbols in the `LANGUAGE_CODE` are replaced with
15961608
dashes.
15971609
This will generate `dist/npm__{LANGUAGE_CODE}.js`.
@@ -1600,6 +1612,16 @@ You can then import/require it:
16001612
import firebaseui from './npm__{LANGUAGE_CODE}';
16011613
```
16021614

1615+
Build names for language codes with underscores, eg. `zh_tw`, `zh_cn`, `pt_pt`
1616+
will be mapped to `zh-TW`, `xh-CN`, `pt-PT`. The underscore will be replaced by
1617+
a hyphen symbol and the subsequent characters will be capitalized.
1618+
1619+
```bash
1620+
npm run build build-npm-zh-TW
1621+
```
1622+
1623+
This will create a binary `npm__zh_tw.js` in the `dist/` folder.
1624+
16031625
### Running the demo app
16041626

16051627
To run the demo app, you must have a Firebase project set up on the

0 commit comments

Comments
 (0)