update readmes
This commit is contained in:
@@ -48,6 +48,9 @@ This package provides business logic to fetch common things required for integra
|
|||||||
### [stream_chat_flutter](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_flutter)
|
### [stream_chat_flutter](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_flutter)
|
||||||
This library includes both a low-level chat SDK and a set of reusable and customizable UI components.
|
This library includes both a low-level chat SDK and a set of reusable and customizable UI components.
|
||||||
|
|
||||||
|
### [stream_chat_localizations](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_localizations)
|
||||||
|
This library includes a set of localization files for the Flutter UI components.
|
||||||
|
|
||||||
## Flutter Chat Tutorial
|
## Flutter Chat Tutorial
|
||||||
|
|
||||||
The best place to start is the [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/).
|
The best place to start is the [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/).
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
||||||
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
||||||
|
|
||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_flutter/changelog) to see the latest changes in the package.
|
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_flutter/changelog) to see the latest changes in the package.
|
||||||
|
|||||||
@@ -20,7 +20,18 @@ This package provides localized strings for the stream chat widgets for many lan
|
|||||||
|
|
||||||
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_localizations/changelog) to see the latest changes in the package.
|
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_localizations/changelog) to see the latest changes in the package.
|
||||||
|
|
||||||
|
## Supported languages
|
||||||
|
|
||||||
|
At the moment we support the following languages:
|
||||||
|
- [English](https://pub.dev/documentation/stream_chat_localizations/latest/stream_chat_localizations/StreamChatLocalizationsEn-class.html)
|
||||||
|
- [Hindi](https://pub.dev/documentation/stream_chat_localizations/latest/stream_chat_localizations/StreamChatLocalizationsHi-class.html)
|
||||||
|
- [Italian](https://pub.dev/documentation/stream_chat_localizations/latest/stream_chat_localizations/StreamChatLocalizationsIt-class.html)
|
||||||
|
- [French](https://pub.dev/documentation/stream_chat_localizations/latest/stream_chat_localizations/StreamChatLocalizationsFr-class.html)
|
||||||
|
|
||||||
|
More languages will be added in the future. Feel free to [contribute](https://github.com/GetStream/stream-chat-flutter/blob/master/CONTRIBUTING.md) to add more languages.
|
||||||
|
|
||||||
## Add dependency
|
## Add dependency
|
||||||
|
|
||||||
Add this to your package's pubspec.yaml file, use the latest version [](https://pub.dartlang.org/packages/stream_chat_localizations)
|
Add this to your package's pubspec.yaml file, use the latest version [](https://pub.dartlang.org/packages/stream_chat_localizations)
|
||||||
```yaml
|
```yaml
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -30,6 +41,7 @@ dependencies:
|
|||||||
You should then run `flutter packages get`
|
You should then run `flutter packages get`
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stream_chat_localizations/stream_chat_localizations.dart';
|
import 'package:stream_chat_localizations/stream_chat_localizations.dart';
|
||||||
@@ -65,7 +77,20 @@ class MyApp extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Adding a new language
|
||||||
|
|
||||||
|
To add a new language, you need to create a new class extending `GlobalStreamChatLocalizations` and create a delegate for it adding it to the `delegates` array.
|
||||||
|
|
||||||
|
Checkout [this example](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/example/lib/add_new_lang.dart) to see how to add a new language.
|
||||||
|
|
||||||
|
### Override exisiting languages
|
||||||
|
|
||||||
|
To override an existing language, you need to create a new class extending that particular language class and create a delegate for it adding it to the `delegates` array.
|
||||||
|
|
||||||
|
Checkout [this example](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/example/lib/override_lang.dart) to see how to override an existing language.
|
||||||
|
|
||||||
### ⚠️ Note on **iOS**
|
### ⚠️ Note on **iOS**
|
||||||
|
|
||||||
For translation to work on **iOS** you need to add supported locales to
|
For translation to work on **iOS** you need to add supported locales to
|
||||||
`ios/Runner/Info.plist` as described [here](https://flutter.dev/docs/development/accessibility-and-localization/internationalization#specifying-supportedlocales).
|
`ios/Runner/Info.plist` as described [here](https://flutter.dev/docs/development/accessibility-and-localization/internationalization#specifying-supportedlocales).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user