On Saturday, February 8, 2020 at 12:56:29 PM UTC-5, Vetti52 wrote: > > After that I am wondering, if there are attempts to prepare a common > solution for internationalisation. It was not that easy to find all places, > where english expressions had to be replaced. Well, in the Weewx wiki I > found at least three solutions, a french standard skin, niculskin and > Weewx-Weather34, which provide translations, each at its own way. >
there is not yet "one true way" for i18n, as you can see from the various skin implementations. however, l10n is somewhat more standard. the customization guide describes some sustainable approaches: http://weewx.com/docs/customizing.htm#localization some of the fallback/default changes in the weewx 3.9 releases made i18n a bit easier lately i have been using some i18n libraries in javascript to ensure translations between english, korean, and chinese. it is tedious. the approaches tend to follow the old gettext approach, but on the plus side there is better support for tense/plurals/etc using string formatting. i guess i would generalize to two approaches: 1) if the skin is tiny, then substitute strings (the gettext approach) 2) if the skin is more than a couple of pages, then create a separate directory for each language. try to consolidate common code if possible. and of course, if you eliminate words, then you don't have to translate, just localize :) m -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/d97319fb-8ce0-406b-a602-6fb825c6c1e7%40googlegroups.com.
