guessLocaleFromFile = (filename) => {
    const extensionRegex = new RegExp(extension + '$', 'g')
    const prefixRegex = new RegExp('^' + prefix, 'g')

    if (!filename) return false
    if (prefix && !filename.match(prefixRegex)) return false
    if (extension && !filename.match(extensionRegex)) return false
    return filename.replace(prefix, '').replace(extensionRegex, '')
  }
tries to guess locales from a given filename