よる is a grammatically versatile verb that means “according to” or “due to/by”. It was introduced very briefly here when we met だそうだ。
日経によると、その会社が買収の標的だそうです。
According to the Nikkei, that company is the target of a takeover.
天気予報によると、雨が降るそうです。
The weather forecast said it would rain.
Modifying a Noun (による)
When connected to a noun, it is best translated as “as a result of” or “due to”.
交通事故による影響で2時間も遅れてしまいました。
I was two hours late because of the traffic accident.
The literal translation: “By means of the effect according to the traffic accident I was late for as much as two hours”.
It’s worth remembering that we don’t have to use による in the above sentence. The particle の instead would also be perfectly natural (交通事故の影響で).
数週間に続く深夜勤務によるストレスに苦しむ。
Suffer stress as a result of several weeks of late nights at work.
Depending On (によって)
When used with the te-form, it is usually translated as “depending on”. Note that I’m giving these translations because they are more natural in English, but the core logic of “according to” still fits perfectly into all of these sentences.
季節によって気候が違う。
The climate is different depending on the season.
言語は国によって違う。
Language is different depending on the country.
入試の結果によって入学が決まります。
Matriculation is determined by the results of the entrance examination.
One slight variation of the above is the following:
~によっては~もある。
We use this structure to state a possible result in certain specific cases (“depending on X, there are also cases where…”).
悪天候によっては、イベントを中止することもあります。
There are cases in which we will cancel the event due to bad weather.
Passive Voice: Created By (によって)
Used in place of に with the passive voice, によって has a more formal ring and so would normally be used only in writing. It is specifically used to indicate the creator, inventor, or instigator of something.