def METHOD_NAME(request, domain, app_id):
    lang = request.POST.get('language')
    validate = request.POST.get('validate')
    app = get_app(domain, app_id)
    file = request.file
    try:
        workbook = get_workbook(file)
    except WorkbookJSONError as e:
        messages.error(request, str(e))
    else:
        if validate:
            if not lang:
                msgs = [(messages.error, _("Please select language to validate."))]
            else:
                try:
                    msgs = validate_bulk_app_translation_upload(
                        app, workbook, request.couch_user.get_email(), lang, file
                    )
                except BulkAppTranslationsException as e:
                    msgs = [(messages.error, str(e))]
        else:
            sheet_name_to_unique_id = get_sheet_name_to_unique_id_map(request.file, lang)
            msgs = process_bulk_app_translation_upload(app, workbook, sheet_name_to_unique_id, lang=lang)
            app.save()
        _add_messages_to_request(request, msgs)
    # In v2, languages is the default tab on the settings page
    return HttpResponseRedirect(
        reverse('app_settings', args=[domain, app_id])
    )