support spanish

This commit is contained in:
Sacha Arbonel
2021-07-29 15:22:34 -04:00
parent 7f589edeb1
commit 255fc50510
2 changed files with 369 additions and 6 deletions
@@ -3,6 +3,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
part 'stream_chat_localizations_es.dart';
part 'stream_chat_localizations_en.dart';
part 'stream_chat_localizations_fr.dart';
@@ -19,12 +21,7 @@ part 'stream_chat_localizations_hi.dart';
/// See also:
///
/// * [getStreamChatTranslation], whose documentation describes these values.
const kStreamChatSupportedLanguages = {
'en',
'hi',
'fr',
'it',
};
const kStreamChatSupportedLanguages = {'en', 'hi', 'fr', 'it', 'es'};
/// Creates a [GlobalStreamChatLocalizations] instance for the given `locale`.
///
@@ -54,6 +51,8 @@ GlobalStreamChatLocalizations? getStreamChatTranslation(Locale locale) {
return const StreamChatLocalizationsFr();
case 'it':
return const StreamChatLocalizationsIt();
case 'es':
return const StreamChatLocalizationsEs();
}
}