It is currently October 19th, 2021, 3:01 am

Speaking TextClock6 with Weather

Weather skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4426
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Speaking TextClock6 with Weather

Post by eclectic-tech »

Yes, the feed changed again in the summer so the August update is the working version. Darn that weather channel! :x

Glad to hear you got it working again and your English is completely understandable! :thumbup:
SCP
Posts: 1
Joined: February 12th, 2021, 9:22 am

Re: Speaking TextClock6 with Weather

Post by SCP »

Quick question,
I am english and I cannot read farenheit, so could you please tell me how to switch the clock to celcius
Thanks
User avatar
jsmorley
Developer
Posts: 22368
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speaking TextClock6 with Weather

Post by jsmorley »

SCP wrote: February 12th, 2021, 9:24 am Quick question,
I am english and I cannot read farenheit, so could you please tell me how to switch the clock to celcius
Thanks
Right-click and select "Edit Weather Variables" to Edit the file WeatherComJSONVariables.inc in the @Resources folder of the skin and change Units=e to Units=m.

Save the file and refresh the skin.
Pablo
Posts: 2
Joined: September 16th, 2021, 3:21 pm

Re: Speaking TextClock6 with Weather

Post by Pablo »

Nice skin bro, question, how i change the language of the month and days to spanish? thanks in advance.

Image
User avatar
jsmorley
Developer
Posts: 22368
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speaking TextClock6 with Weather

Post by jsmorley »

Pablo wrote: September 16th, 2021, 3:26 pm Nice skin bro, question, how i change the language of the month and days to spanish? thanks in advance.

Image
The days of the week and months are coming from the .lua code, and the os.date() functions in Lua are based on the current "locale" set on your computer. So you would need to edit the Lua and use string.gsub() on the values returned and set for weekdayName and monthName, in order to change Monday to Lunes.

I assume you have already done some editing to change other things like the textual numbers to Spanish.

Find the function DateString() in the .lua, and add some string.gsub() calls...

Code: Select all

function DateString()

	weekdayName = os.date('%A')
	monthName = os.date('%B')
	
	weekdayName = string.gsub(weekdayName, 'Monday', 'lunes')
	weekdayName = string.gsub(weekdayName, 'Tuesday', 'martes')
	weekdayName = string.gsub(weekdayName, 'Wednesday', 'miércoles')
	weekdayName = string.gsub(weekdayName, 'Thursday', 'jueves')
	weekdayName = string.gsub(weekdayName, 'Friday', 'viernes')
	weekdayName = string.gsub(weekdayName, 'Saturday', 'sábado')
	weekdayName = string.gsub(weekdayName, 'Sunday', 'domingo')
	
Do the same for monthName.
Pablo
Posts: 2
Joined: September 16th, 2021, 3:21 pm

Re: Speaking TextClock6 with Weather

Post by Pablo »

jsmorley wrote: September 16th, 2021, 3:45 pm The days of the week and months are coming from the .lua code, and the os.date() functions in Lua are based on the current "locale" set on your computer. So you would need to edit the Lua and use string.gsub() on the values returned and set for weekdayName and monthName, in order to change Monday to Lunes.

I assume you have already done some editing to change other things like the textual numbers to Spanish.

Find the function DateString() in the .lua, and add some string.gsub() calls...

Code: Select all

function DateString()

	weekdayName = os.date('%A')
	monthName = os.date('%B')
	
	weekdayName = string.gsub(weekdayName, 'Monday', 'lunes')
	weekdayName = string.gsub(weekdayName, 'Tuesday', 'martes')
	weekdayName = string.gsub(weekdayName, 'Wednesday', 'miércoles')
	weekdayName = string.gsub(weekdayName, 'Thursday', 'jueves')
	weekdayName = string.gsub(weekdayName, 'Friday', 'viernes')
	weekdayName = string.gsub(weekdayName, 'Saturday', 'sábado')
	weekdayName = string.gsub(weekdayName, 'Sunday', 'domingo')
	
Do the same for monthName.
Dude, you're awesome! thanks a lot :D :D
User avatar
jsmorley
Developer
Posts: 22368
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speaking TextClock6 with Weather

Post by jsmorley »

Pablo wrote: September 16th, 2021, 5:41 pm Dude, you're awesome! thanks a lot :D :D
Glad to help.