Skip to content

Commit

Permalink
Update Adding-Languages.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP authored Oct 15, 2024
1 parent b7b3f73 commit a01ecf1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions docs/Adding-Languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- Copy `interface/src/i18n/en/index.ts` to `interface/src/i18n/XY/index.ts`
- Change in the first and last line `en` to your language and in the first lines `BaseTranslation` to `Translation`
- Edit `interface/src/i18n/XY/index.ts` and replace the English texts by your language
- Edit `interface/src/components/layout/LayoutAuthMenu.tsx` and add the following:
- Edit `interface/src/components/layout/LanguageSelector.tsx` and add the following:

```
import { ReactComponent as XYflag } from 'i18n/XY.svg';
Expand All @@ -16,17 +16,6 @@ import { ReactComponent as XYflag } from 'i18n/XY.svg';
</MenuItem>
```

- Edit `interface/src/SignIn.tsx` and add a button:

```
import { ReactComponent as XYflag } from './i18n/XY.svg';
...
<Button size="small" variant={locale === 'XY' ? 'contained' : 'outlined'} onClick={() => selectLocale('XY')}>
<XYflag style={{ width: 24 }} />
&nbsp;XY
</Button>
```

- Navigate to the `interface` folder and type `npm run standalone` or `npm run typesafe-i18n` and test the WebUI

### How to add language XY to device entities
Expand Down

0 comments on commit a01ecf1

Please sign in to comment.