Some answers below.

Gary

On Saturday, 4 April 2020 00:58:44 UTC+10, Astrid wrote:

> Hello!
>
> I am using weewx 3.9.2 and highcharts.
> It is working very well. :)
>
> How can I get german letters into week.json.tmpl?
>
> Instead of
>
> "windplot": {"series":
> {"windSpeed": {"name": "Windstaerke", "data": $windSpeedWeekjson},
> "windGust": {"name": "Boeen", "data": $windGustWeekjson}},
> "units": "$unit.label.windSpeed"#slurp
>
> I want to get 
>
> "windplot": {"series":
> {"windSpeed": {"name": "Windst*ä*rke", "data": $windSpeedWeekjson},
> "windGust": {"name": "B*ö*en", "data": $windGustWeekjson}},
> "units": "$unit.label.windSpeed"#slurp
>
> if I write it as above into week.json.tmpl, then week.json will
> not be created.
>
> The templates were never developed with language support in mind; however, 
it should be easy enough to add. In the templates 
skins/Highcharts/json/week.json.tmpl and 
skins/Highcharts/json/year.json.tmpl insert the highlighted line near the 
top of the files as indicated:

##errorCatcher Echo
#encoding UTF-8
##

Save the files and on the next report cycle your German characters should 
render fine. I don't have time to do an extensive checking of that 
extension just now so I cannot guarantee this will not cause some other 
issue elsewhere, let me know if it does.
 

> And how can I change in highchartplot the text from "hamburger"-menu,
> where now is standing "Chart context menu"?
>

The highcharts extension makes no changes to the chart hamburger menu, so 
anything you want to chnage you will need to refer to the Highcharts API 
<https://api.highcharts.com/highcharts/>. 


> Some parts I already get changed by putting into plots.js:
>
> var highchartsOptions = Highcharts.setOptions({
>       lang: {
>             loading: 'Lade...',
>             months: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 
> 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
>             weekdays: ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],
>             shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 
> 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
>             exportButtonTitle: "Exportieren",
>             printButtonTitle: "Drucken",
>             rangeSelectorFrom: "von",
>             rangeSelectorTo: "bis",
>             rangeSelectorZoom: "Zeitraum",
>             downloadPNG: 'Download als png',
>             downloadJPEG: 'Downlaod als jpeg',
>             downloadPDF: 'Download als pdf',
>             downloadSVG: 'Download als svg',
>             resetZoom: "Reset",
>             resetZoomTitle: "Reset",
>             thousandsSep: ",",
>             decimalPoint: '.'
>             }
>       }
> );
>

OK, so those changes will change the language displayed for each item.
 

>
> But there is left in "Chart Context Menu" (this itself):
> "View in fullscreen" and "Print chart"
>

You want to change 'View in fullscreen' and 'Print chart' to German? If so 
you shoudl use the viewFullscreen 
<https://api.highcharts.com/highcharts/lang.viewFullscreen> and 
exitFullscreen options in your lang setting above.
 

>
> and in the charts, where on the right top corner can be input
> the date "from" and the date "to", that in can be done in
> german notation dd.mm.yyyy?
>

Do you want to chnage the format of the dates in the From and To boxes? If 
so you need to change the inputDateFormat and inputEditDateFormat options 
in the theme.js file included with the highcharts extension. inputDateFormat 
sets the format displayed in each box and inputEditDateFormat sets the 
format displayed when editing each box.
 

>
> Regards, Astrid
>
>
>

-- 
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/4490e078-65f9-4c86-9f3b-c06fb0f3f5ec%40googlegroups.com.

Reply via email to