language_config_manager.dart 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import 'dart:ui';
  2. import 'package:fis_common/index.dart';
  3. import 'package:fis_common/logger/logger.dart';
  4. import 'package:fis_jsonrpc/rpc.dart';
  5. import 'package:fis_ui/index.dart';
  6. import 'package:flutter/material.dart';
  7. import 'package:get/get.dart';
  8. import 'interfaces/base_manager.dart';
  9. import 'interfaces/language.dart';
  10. class LanguageConfigManager extends BaseManager
  11. implements ILanguageConfigManager {
  12. /// 中文
  13. static const Locale CHINESE_LOCALE = const Locale("zh", "CN");
  14. /// 英文
  15. static const Locale ENGLISH_LOCALE = const Locale("en", "US");
  16. /// 检查翻译
  17. /// [code] 翻译key
  18. @override
  19. String getExamLanguageValue(String code) {
  20. try {
  21. // var value = languageService.findLanguageValueByCode('exam', code);
  22. // return value;
  23. } catch (e) {
  24. print(e);
  25. }
  26. return code;
  27. }
  28. /// 诊断相关翻译
  29. /// [code] 翻译key
  30. @override
  31. String getConsultationLanguageValue(String code) {
  32. try {
  33. // var value = languageService.findLanguageValueByCode('consultation', code);
  34. // return value;
  35. } catch (e) {
  36. print(e);
  37. }
  38. return code;
  39. }
  40. /// 器官部位相关翻译
  41. /// [code] 翻译key
  42. @override
  43. String getApplicationLanguageValue(String code) {
  44. try {
  45. // var value = languageService.findLanguageValueByCode('application', code);
  46. // return value;
  47. } catch (e) {
  48. print(e);
  49. }
  50. return code;
  51. }
  52. @override
  53. Future<bool> swithLanguageByCode(String languageCode) async {
  54. Locale locale;
  55. bool result = false;
  56. return result;
  57. }
  58. }