It is currently April 19th, 2024, 2:23 am
lua question
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: lua question
Yes, you was right that I forgot to replace some lines in the original script. But I'm glad if finally you could make it to work well.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: lua question
This should keep you busy for basically the rest of your life dvo...
https://forum.rainmeter.net/viewtopic.php?p=123416#p123416
https://forum.rainmeter.net/viewtopic.php?p=123416#p123416
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: lua question
dvo,
Try changing the URL in the skin .ini to:
URL=https://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#UnitOfMeasure#&dayf=1&locale=nl_NL
That should cause the wxdata feed to return the "conditions text" in Dutch.
I'm not convinced this could easily be made language-neutral by just setting up tables to replace all the elements with strings that can easily be translated. While this is true of the basic elements, like the numbers, and the names of days of the week and names of months, and the weather "conditions" can be returned in many different languages by wxdata.weather.com, the way things are "spoken" (in a sense) are pretty aggressively English in nature in this, and in fact pretty aggressively American-English. While it might be possible (you certainly have made a good start) to modify the Lua to change the structure of how things are presented in your language, as well as translate the stuff that makes sense in tables, I'm not sure it could easily be made generic.
A simple example is the fact that at 2:30 I would say "Half past two" and you would say "Half three". That is not a translation, but an "exception", and I suspect there are many of them in the course of this for different countries, regions, languages, cultures, and even generations of age. Hell, in the UK, a guy in another town 20 miles away can sound like a "damn foreigner" to you.
Try changing the URL in the skin .ini to:
URL=https://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#UnitOfMeasure#&dayf=1&locale=nl_NL
That should cause the wxdata feed to return the "conditions text" in Dutch.
I'm not convinced this could easily be made language-neutral by just setting up tables to replace all the elements with strings that can easily be translated. While this is true of the basic elements, like the numbers, and the names of days of the week and names of months, and the weather "conditions" can be returned in many different languages by wxdata.weather.com, the way things are "spoken" (in a sense) are pretty aggressively English in nature in this, and in fact pretty aggressively American-English. While it might be possible (you certainly have made a good start) to modify the Lua to change the structure of how things are presented in your language, as well as translate the stuff that makes sense in tables, I'm not sure it could easily be made generic.
A simple example is the fact that at 2:30 I would say "Half past two" and you would say "Half three". That is not a translation, but an "exception", and I suspect there are many of them in the course of this for different countries, regions, languages, cultures, and even generations of age. Hell, in the UK, a guy in another town 20 miles away can sound like a "damn foreigner" to you.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: lua question
"It is impossible for an Englishman to open his mouth without making some other Englishman despise him,"
-- George Bernard Shaw
-- George Bernard Shaw
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: lua question
Sure, but that is just brute-force translation. That suite of skins doesn't really have to be too concerned about how things are expressed in a colloquial fashion by different cultures.dvo wrote:http://flyinghyrax.deviantart.com/art/Elementary-2-0-426588102
this skin just has a translator built in to it ?
and even you in the credits
Anyway, my Lua is open for anyone to modify as they see fit. While it is programming, you will find that Lua is pretty easy compared to other programming languages.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: lua question
Even the simple numbers are not as straightforward as all that when you are spelling them out and not using numerals...
English: fifty-six
Spanish: cincuenta y seis
French: cinquante six
Italian: cinquantasei
German: sechsundfünfzig
Dutch: zesenvijftig
If I go to Google Translate and put this:
it's seven minutes to eleven in the morning
on monday, the sixteenth of may
the weather is sunny
it's fairly cool at fifty-five degrees
and translate it to Dutch, I get:
het zeven voor elf in de ochtend
Op maandag , de zestiende mei
het is zonnig
het is vrij koel ' vijfenvijftig graden
While the only Dutch I know is "Vertrouw nooit een Duitser", I'm betting that is not even close to how you would express the same thing.
English: fifty-six
Spanish: cincuenta y seis
French: cinquante six
Italian: cinquantasei
German: sechsundfünfzig
Dutch: zesenvijftig
If I go to Google Translate and put this:
it's seven minutes to eleven in the morning
on monday, the sixteenth of may
the weather is sunny
it's fairly cool at fifty-five degrees
and translate it to Dutch, I get:
het zeven voor elf in de ochtend
Op maandag , de zestiende mei
het is zonnig
het is vrij koel ' vijfenvijftig graden
While the only Dutch I know is "Vertrouw nooit een Duitser", I'm betting that is not even close to how you would express the same thing.