def update_language_cases
      @cases = parse_language_cases
    
      unless params[:case_action]
        return render(:partial => "edit_cases")
      end
  
      if params[:case_action].index("add_at")
        position = params[:case_action].split("_").last.to_i
        @cases.insert(position, Tr8n::LanguageCase.new(:language => tr8n_current_language))
      elsif params[:case_action].index("delete_at")
        position = params[:case_action].split("_").last.to_i
        @cases.delete_at(position)
      elsif params[:case_action].index("clear_all")
        @cases = []
      end
    
      render :partial => "edit_language_cases"      
    end
def update_language_cases
      @cases = parse_language_cases
    
      unless params[:case_action]
        return render(:partial => "edit_cases")
      end
  
      if params[:case_action].index("add_at")
        position = params[:case_action].split("_").last.to_i
        @cases.insert(position, Tr8n::LanguageCase.new(:language => tr8n_current_language))
      elsif params[:case_action].index("delete_at")
        position = params[:case_action].split("_").last.to_i
        @cases.delete_at(position)
      elsif params[:case_action].index("clear_all")
        @cases = []
      end
    
      render :partial => "edit_language_cases"      
    end
ajax method for updating language cases in edit mode