Derive function lang from filename extension, if no lang is given