Hello! I currently use a weather skin, lottaweather by louisly (https://www.deviantart.com/louisly/art/Lottaweather-1-5-2-847570474). The thing is I'm not English native speaker and I would like to translate it to have the days and current weather situation in my language, but I don't understand the code so I can't really translate! If anyone wants to help I'm grateful!!
Thanks for reading and have a nice day!
It is currently May 4th, 2024, 8:37 am
Translation of weather skin
-
- Posts: 6
- Joined: April 15th, 2022, 1:41 pm
-
- Rainmeter Sage
- Posts: 16198
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Translation of weather skin
No need to translate manually the skin. You have to edit the Language variable in the @Resources\UserSettings.inc file. Replace its existing Language=en_GB value with the desired language code, taken from here. Try to refresh the skin.
If there are some weird \u0100 symbols (or obviously any other value), try to add a DecodeCodePoints=1 option to all WebParser measures of the skin and refresh it again.
-
- Posts: 6
- Joined: April 15th, 2022, 1:41 pm
Re: Translation of weather skin
Thanks for answering! I’ll try that tomorrow (night here)
-
- Rainmeter Sage
- Posts: 16198
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Translation of weather skin
Alright, please let me know what's going on when you try it.
-
- Posts: 6
- Joined: April 15th, 2022, 1:41 pm
Re: Translation of weather skin
Hi! I was able to use the code for changing location and so translate. I had to use the DecodeCodePoints=1 command but I think I misplaced it or put it in too much page so it didn’t work.
-
- Rainmeter Sage
- Posts: 16198
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Translation of weather skin
What you mean by "didn't work"? Did you get the information translated?
-
- Posts: 6
- Joined: April 15th, 2022, 1:41 pm
Re: Translation of weather skin
It did work but there were some number as you mentioned even with the command, maybe because I didn't put it in the right place or misused it. And there was also some thing with the traduction: for the weather of all the week, they put the name of the days entirely it was overwhelming and didn't fit, so I decided to try translate some of the skin myself. I was able to translate the weather day by day, that before put me the whole letters of the days, in a more convenant way (it wasn't overwhelming this time). I was thinking of a way to translate by myself right now, that would let me have more control of the traduction, I think.
-
- Rainmeter Sage
- Posts: 16198
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Translation of weather skin
Post your code please (use the </> button to create the needed tags to delimitate the code you want to post).
Do you know how to do this? Do you know how the Substitute option does work?
A while ago there was a tip on how these skins have to be translated. Doesn't entirely apply anymore, however maybe you can find there a few ideas.
-
- Posts: 6
- Joined: April 15th, 2022, 1:41 pm
Re: Translation of weather skin
I've seen this substitue command before on video with the topic of translating rainmeter skins. I've also seen something similar like to translate (it was a document made especially to translate for another skin). I thought of using it but didn't really know where to put it, and also because I don't really know all the word used in this skin and that you need it for the command to work.
Code: Select all
Date="Sunday":"Dimanche"
-
- Rainmeter Sage
- Posts: 16198
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Translation of weather skin
This, in this form can be defined only as a variable (in the [Variables] section) and used accordingly. Did you do this? If you don't know, my question is if you have somewhere, on some measure(s) a Substitute=#Date# option?The Co wrote: ↑April 17th, 2022, 3:49 pm I've seen this substitue command before on video with the topic of translating rainmeter skins. I've also seen something similar liketo translate (it was a document made especially to translate for another skin). I thought of using it but didn't really know where to put it, and also because I don't really know all the word used in this skin and that you need it for the command to work.Code: Select all
Date="Sunday":"Dimanche"
The idea behind the Substitute option is the following: you have to use such an option on measures. A Substitute option can't be added to meters. So this means that you can add these options to sections having a Measure=Something option (in this case to sections having a Measure=WebParser option). these sections are returning some information, for instance the day of week. When the measure gets the information, if it has a Substitute option, it checks if the string added to the first part of the Substitute option (so the part before the :) is present on what the measure should return. If it is, it is substituted with the second part (so the part following the :). If in what the measure is returning the first part is not present, no substitution is made.
So let's say a measure returns the Sunday string. If it has a Substitute="Sunday":"Dimanche" option, it doesn't return Sunday, because Sunday is substituted with Dimanche. If the measure having this option returns Monday instead of Sunday, since there is not substitution made for Monday, the measure keeps returning Monday. If you add behind the above substitution, one for Monday as well (Substitute="Sunday":"Dimanche","Monday":"Lundi"), the measure returns Lundi instead of Monday. You have to add such a pair for all days of the week, in order to get translated all days of week.
BTW, details here.