chore(localization): update readme.md
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -1,14 +1,90 @@
|
|||||||
# stream_chat_localizations
|
# Official Localizations for [Stream Chat Flutter](https://getstream.io/chat/sdk/flutter/) library.
|
||||||
|
|
||||||
A new Flutter project.
|
> The Official localizations for Stream Chat Flutter, a service for
|
||||||
|
> building chat applications.
|
||||||
|
|
||||||
## Getting Started
|
[](https://pub.dartlang.org/packages/stream_chat_localizations)
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
This project is a starting point for a Dart
|
|
||||||
[package](https://flutter.dev/developing-packages/),
|
|
||||||
a library module containing code that can be shared easily across
|
|
||||||
multiple Flutter or Dart projects.
|
|
||||||
|
|
||||||
For help getting started with Flutter, view our
|
**Quick Links**
|
||||||
[online documentation](https://flutter.dev/docs), which offers tutorials,
|
|
||||||
samples, guidance on mobile development, and a full API reference.
|
- [Register](https://getstream.io/chat/trial/) to get an API key for Stream Chat
|
||||||
|
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
||||||
|
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
||||||
|
|
||||||
|
This package provides localized strings for the stream chat widgets for many languages.
|
||||||
|
|
||||||
|
### Changelog
|
||||||
|
|
||||||
|
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_localizations/changelog) to see the latest changes in the package.
|
||||||
|
|
||||||
|
## Add dependency
|
||||||
|
Add this to your package's pubspec.yaml file, use the latest version [](https://pub.dartlang.org/packages/stream_chat_localizations)
|
||||||
|
```yaml
|
||||||
|
dependencies:
|
||||||
|
stream_chat_localizations: ^latest_version
|
||||||
|
```
|
||||||
|
|
||||||
|
You should then run `flutter packages get`
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
```dart
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stream_chat_localizations/stream_chat_localizations.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
runApp(MyApp());
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyApp extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MaterialApp(
|
||||||
|
// Add all the supported locales
|
||||||
|
supportedLocales: const [
|
||||||
|
Locale('en'),
|
||||||
|
Locale('hi'),
|
||||||
|
Locale('fr'),
|
||||||
|
Locale('it'),
|
||||||
|
],
|
||||||
|
// Add GlobalStreamChatLocalizations.delegates
|
||||||
|
localizationsDelegates: GlobalStreamChatLocalizations.delegates,
|
||||||
|
builder: (context, widget) => StreamChat(
|
||||||
|
client: client,
|
||||||
|
child: widget,
|
||||||
|
),
|
||||||
|
home: StreamChannel(
|
||||||
|
channel: channel,
|
||||||
|
child: const ChannelPage(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### ⚠️ Note on **iOS**
|
||||||
|
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).
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<key>CFBundleLocalizations</key>
|
||||||
|
<array>
|
||||||
|
<string>en</string>
|
||||||
|
<string>nb</string>
|
||||||
|
<string>fr</string>
|
||||||
|
<string>it</string>
|
||||||
|
</array>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
We welcome code changes that improve this library or fix a problem,
|
||||||
|
please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github.
|
||||||
|
We are pleased to merge your code into the official repository.
|
||||||
|
Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first.
|
||||||
|
See our license file for more details.
|
||||||
|
|||||||
Reference in New Issue
Block a user