wxiaoguang
a60e8be8d1
Refactor i18n, use Locale to provide i18n/translation related functions ( #18648 )
...
* remove unnecessary web context data fields, and unify the i18n/translation related functions to `Locale`
* in development, show an error if a translation key is missing
* remove the unnecessary loops `for _, lang := range translation.AllLangs()` for every request, which improves the performance slightly
* use `ctx.Locale.Language()` instead of `ctx.Data["Lang"].(string)`
* add more comments about how the Locale/LangType fields are used
2022-02-08 11:02:30 +08:00
..
2022-01-20 18:46:10 +01:00
2021-09-09 21:13:36 +01:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-02-08 11:02:30 +08:00
2022-01-25 08:33:40 +02:00
2022-01-20 18:46:10 +01:00
2022-02-06 20:01:47 +01:00
2022-01-20 18:46:10 +01:00
2021-12-20 04:41:31 +00:00
2022-01-26 12:10:10 +08:00
2022-02-06 20:01:47 +01:00
2022-02-06 20:01:47 +01:00
2022-01-20 18:46:10 +01:00
2020-10-02 23:37:53 -04:00
2022-01-20 18:46:10 +01:00
2021-12-20 04:41:31 +00:00
2022-01-20 18:46:10 +01:00
2022-01-19 19:31:39 -05:00
2022-02-06 20:01:47 +01:00
2022-01-22 21:59:34 +00:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-01-31 01:48:47 +02:00
2022-01-20 18:46:10 +01:00
2022-02-01 13:20:28 -05:00
2022-01-20 18:46:10 +01:00
2022-01-22 21:22:14 +00:00
2022-01-20 18:46:10 +01:00
2021-06-07 07:27:09 +02:00
2021-09-22 13:38:34 +08:00
2022-01-26 10:45:51 +01:00
2022-01-20 18:46:10 +01:00
2021-08-19 16:41:20 -04:00
2022-01-23 20:19:49 +08:00
2022-02-05 20:51:25 +00:00
2021-09-22 13:38:34 +08:00
2022-01-20 18:46:10 +01:00
2022-02-06 20:01:47 +01:00
2022-02-04 18:03:15 +01:00
2022-01-20 18:46:10 +01:00
2022-02-08 09:34:37 +08:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-01-25 08:33:40 +02:00
2021-09-22 13:38:34 +08:00
2020-01-15 23:58:33 +02:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-02-08 11:02:30 +08:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2021-12-20 04:41:31 +00:00
2021-12-23 16:27:33 +00:00
2020-04-05 07:20:50 +01:00
2022-02-01 20:59:25 +08:00
2022-01-20 18:46:10 +01:00
2022-01-22 15:05:22 +00:00