languages.ts 942 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2017-2020 @polkadot/apps-config authors & contributors
  2. // This software may be modified and distributed under the terms
  3. // of the Apache-2.0 license. See the LICENSE file for details.
  4. import { TFunction } from 'i18next';
  5. import { Option } from './types';
  6. export default function create (t: TFunction): Option[] {
  7. return [
  8. {
  9. text: t<string>('lng.detect', 'Default browser language (auto-detect)', { ns: 'apps-config' }),
  10. value: 'default'
  11. },
  12. // default/native
  13. {
  14. text: 'English',
  15. value: 'en'
  16. },
  17. // translations (sorted by language code)
  18. {
  19. text: 'عربى',
  20. value: 'ar'
  21. },
  22. {
  23. text: 'Español',
  24. value: 'es'
  25. },
  26. {
  27. text: '日本語',
  28. value: 'ja'
  29. },
  30. {
  31. text: 'Português',
  32. value: 'pt'
  33. },
  34. {
  35. text: 'русский',
  36. value: 'ru'
  37. },
  38. {
  39. text: '汉语',
  40. value: 'zh'
  41. }
  42. ];
  43. }