ざる is the 連体形 (attributive form) of the old-fashioned 助動詞(じょどうし) (auxiliary verb) ざり. ざり carries the same meaning as the modern ない, in negating what comes before it.
When joined with a combination of the る-Verb
得(え)る ‘to gain’, or ‘to acquire’, and the 助動詞(じょどうし) (auxiliary verb) ない, it becomes a double-negative structure meaning that one ‘cannot help doing (A)’, or ‘there is no choice but to (A)’. More literally, it means that one ‘can’t not (A)’.
This structure will conjugate with other verbs in exactly the same way as ない.
-
山(やま)の頂上(ちょうじょう)まで登(のぼ)りたかったが、天候(てんこう)が悪(わる)くなって来(き)たので諦(あきら)めざるを得(え)ない。
I wanted to hike to the peak of the mountain, but the weather was getting worse so we had no choice but to give up.
先輩(せんぱい)に指示(しじ)されたので従(したが)わざるを得(え)ない。
Because my senpai told me to do it, I had no choice but to obey.
Caution - As ざり is an old-fashioned structure, it conjugates a little bit differently with する than the regular ない.
-
フランスの大学(だいがく)へ行(い)くため、フランス語(ご)を勉強(べんきょう)しざるを得(え)ない。 (Unnatural Japanese)
In order to go to a college in France, I have no choice but to study French.
フランスの大学(だいがく)へ行(い)くため、フランス語(ご)を勉強(べんきょう)せざるを得(え)ない。 (Natural Japanese)
In order to go to a college in France, I have no choice but to study French.
Notice here that instead of しない changing to しざる, せざる will be used instead.