The decimal and thousands separators are both set by the OS's locale. -tk
On Thu, May 4, 2023 at 7:07 AM [email protected] < [email protected]> wrote: > Thanks Tom. On which setting does the locale formatting depend? Is it the > OS default locale? In other words: even with internationalized skins > numbers are formatted in a single way, regardless of the language? Since > only the language is configured to translate skins, I assume so. My > research so far showed it's not so straight forward to work with different > locales at the same time in python, without using Babel or something > similar. > > Tom Keffer schrieb am Donnerstag, 4. Mai 2023 um 15:37:22 UTC+2: > >> I can confirm that some of the almanac values (right ascension, >> declination, among others) are returned as simple numbers, not >> ValueHelpers, so they are not subject to locale formatting. That's a bug. >> >> I should be able to fix it for V5. >> >> On Thu, May 4, 2023 at 12:26 AM [email protected] <[email protected]> >> wrote: >> >>> Yes, in the particular case (the Standard skin mentioned above) I am >>> sure. There is a script, but it is dealing with NOAA data files. The same >>> thing seems to occur with the Seasons skin as well. And with the skin I >>> maintain. The OS locale seems to have an effect on how number values are >>> formatted, which results in mixed presentation of number values under >>> certain circumstances. >>> >>> p q schrieb am Mittwoch, 3. Mai 2023 um 19:41:53 UTC+2: >>> >>>> Are you sure? I use javascript on my weewx pages - do to simple things >>>> like rotate through a set of photos. I also use the steelseries gauges that >>>> are all javascript running in the browser. Is there a reason you can't >>>> embed javascript to grab the locale from the browser and do the formatting? >>>> >>>> On Wed, May 3, 2023 at 9:59 AM [email protected] <[email protected]> >>>> wrote: >>>> >>>>> Doesn't apply here since the browser gets static HTML, produced by >>>>> weewx on a (potentially) remote machine different from the webserver, the >>>>> HTML is downloaded from. I am looking for a way to tell weewx to format >>>>> number values for an internationalized skin in a certain way. As far as I >>>>> know, only the language can be set for an internationalized skin, not the >>>>> locale. >>>>> >>>>> p q schrieb am Mittwoch, 3. Mai 2023 um 17:18:09 UTC+2: >>>>> >>>>>> In my professional life I ask my devs to get the locale from the >>>>>> browser and use the tech stack to do the conversion automatically. Like >>>>>> JavaScript .toLocaleString(). >>>>>> >>>>>> Don't know if that's feasible here. >>>>>> >>>>>> On Wed, May 3, 2023, 8:07 AM [email protected] <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> I need a hint how to handle formatting numbers (values) with >>>>>>> internationalized skins. Specifying the language doesn't have an >>>>>>> apparent >>>>>>> effect on how values are formatted, it seems like number value >>>>>>> formatting >>>>>>> is connected to the systems (default?) locale. I even notice >>>>>>> inconsistent >>>>>>> results, for instance with the standard skin: temperature is formatted >>>>>>> in >>>>>>> another way than an alamnac value: in the specific case the temperature >>>>>>> value is formatted with a comma as decimal separator, the almanac angle >>>>>>> with a period as decimal separator. >>>>>>> >>>>>>> Is there a way to specifiy a locale to be used for a skin (or a >>>>>>> translated skin)? [image: 2023-05-03 17_01_24.png] >>>>>>> >>>>>>> -- >>>>>>> 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/62429245-50ef-4f87-89ac-b8cb1b0d064en%40googlegroups.com >>>>>>> <https://groups.google.com/d/msgid/weewx-user/62429245-50ef-4f87-89ac-b8cb1b0d064en%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> >>>>>> -- >>>>> 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/e8ded1e4-2bd9-42d3-86e5-912db59015f3n%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/weewx-user/e8ded1e4-2bd9-42d3-86e5-912db59015f3n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> >>>> >>>> -- >>>> Peter Quinn >>>> (415)794-2264 <(415)%20794-2264> >>>> >>> -- >>> 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/989c5b9a-d26a-46a2-b859-4414bff97bddn%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-user/989c5b9a-d26a-46a2-b859-4414bff97bddn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > 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/c403b4df-3895-4182-adb4-85c0b52f16c2n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/c403b4df-3895-4182-adb4-85c0b52f16c2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAPq0zEDms6v5FsEo8-2wNm1heX0RZ4RTdMF97MRxRE%2BSA02Hhg%40mail.gmail.com.
