@require_admin
@api_handle_error_with_json
def delete_language_pack(request):
 lang_code = simplejson.loads((request.body or '{}')).get('lang')
 delete_language(lang_code)
 return JsonResponse({'success': (_('Successfully deleted language pack for %(lang_name)s.') % {'lang_name': get_language_name(lang_code)})})

@ require_admin @ api_handle_error_with_json def delete_language_pack ( request ) : lang_code = simplejson . loads ( ( request . body or '{}' ) ) . get ( 'lang' ) delete_language ( lang_code ) return JsonResponse ( { 'success' : ( _ ( 'Successfully deleted language pack for %(lang_name)s.' ) % { 'lang_name' : get_language_name ( lang_code ) } ) } )
api endpoint for deleting language pack which fetches the language code which has to be deleted .