Skip to content

Commit

Permalink
Merge pull request #1114 from mkoehne/feat/german-translation
Browse files Browse the repository at this point in the history
feat(localization): add German localization
  • Loading branch information
imtoori authored May 5, 2022
2 parents 2166f6d + fcdd62f commit 9dab952
Show file tree
Hide file tree
Showing 5 changed files with 400 additions and 4 deletions.
4 changes: 4 additions & 0 deletions packages/stream_chat_localizations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Upcoming

* Added support for [German](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart) locale.

## 3.0.0

* Added translations for viewLibrary.
Expand Down
1 change: 1 addition & 0 deletions packages/stream_chat_localizations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ At the moment we support the following languages:
- [Japanese](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart)
- [Korean](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart)
- [Portuguese](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart)
- [German](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart)

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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ part 'stream_chat_localizations_hi.dart';

part 'stream_chat_localizations_pt.dart';

part 'stream_chat_localizations_de.dart';

/// The set of supported languages, as language code strings.
///
/// The [GlobalStreamChatLocalizations.delegate] can generate localizations for
Expand All @@ -36,6 +38,7 @@ const kStreamChatSupportedLanguages = {
'ja',
'ko',
'pt',
'de',
};

/// Creates a [GlobalStreamChatLocalizations] instance for the given `locale`.
Expand Down Expand Up @@ -74,6 +77,8 @@ GlobalStreamChatLocalizations? getStreamChatTranslation(Locale locale) {
return const StreamChatLocalizationsKo();
case 'pt':
return const StreamChatLocalizationsPt();
case 'de':
return const StreamChatLocalizationsDe();
default:
return null;
}
Expand Down
Loading

0 comments on commit 9dab952

Please sign in to comment.