L10N: cache the result of findLanguage

This decreases the load time of a folder with lots of files by above 50% in my tests.

cc: @karlitschek @DeepDiver1975