How does Veb support i18n #25661
Replies: 3 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Another approach is to use remote services for online translation when possible, like in example https://github.com/vlang/v/blob/master/examples/get_weather/get_weather.v#L50 . I18n has been a time/effort consuming problem. Now, with AI services, one could automate words and phrases automatically and save first results as cache as raw responses and permit human intervention for context corrections. Maybe as json files or even sqlite ones. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Debug routing (/i18n/debug)
Print all key/value values for the current request language to facilitate checking if the JSON file is loaded correctly.
Accept Language Cache
Lang_cache caches the mapping from Accept Language to the final language, reducing the cost of parsing each request.
Dynamically load JSON
Every time a request is made, the middleware checks the last modification time of the JSON file and reloads the translation if there are any updates.
Beta Was this translation helpful? Give feedback.
All reactions