resxFileLanguage :: FilePath -> TranslationLanguage
resxFileLanguage fp =
  let withoutResx = withoutSuffix ".resx" fp in
  case withoutResx of
    Nothing -> DefaultLanguage
    Just sp -> 
      let afterLastDot = allAfterLastElementOf '.' sp [] in
      if length afterLastDot > 6 then
        DefaultLanguage
      else
        if (elem '/' afterLastDot || elem '\\' afterLastDot) then
          DefaultLanguage
        else
          TranslationLanguage afterLastDot
resxFileLanguage :: FilePath -> TranslationLanguage
resxFileLanguage fp =
  let withoutResx = withoutSuffix ".resx" fp in
  case withoutResx of
    Nothing -> DefaultLanguage
    Just sp -> 
      let afterLastDot = allAfterLastElementOf '.' sp [] in
      if length afterLastDot > 6 then
        DefaultLanguage
      else
        if (elem '/' afterLastDot || elem '\\' afterLastDot) then
          DefaultLanguage
        else
          TranslationLanguage afterLastDot
resxFileLanguage fp =
  let withoutResx = withoutSuffix ".resx" fp in
  case withoutResx of
    Nothing -> DefaultLanguage
    Just sp -> 
      let afterLastDot = allAfterLastElementOf '.' sp [] in
      if length afterLastDot > 6 then
        DefaultLanguage
      else
        if (elem '/' afterLastDot || elem '\\' afterLastDot) then
          DefaultLanguage
        else
          TranslationLanguage afterLastDot