delivered the opinion of the court.
Pedro Perea filed a verified complaint against Miguel Castro Rivera in the District Court of Mayagüez for the recovery of $738.30, together with interest, costs, disbursements and attorney fees, based on the following causes of action:
(1) That according to the document copied into the complaint, which is signed by the defendant as principal debtor and by the plaintiff as surety and which became due on October 17, 1914, they agreed to pay the sum of $200 with interest, costs and attorney fees in case of an action to recover; and that in an action brought by the creditor against the plaintiff as a consequence of the said obligation, judgment ivas rendered against the latter for the debt of $200 plus costs, expenses, disbursements, interest and attorney fees, amounting to $168.80, which the plaintiff paid and has not been reimbursed by the defendant.
(2) That as defendant’s, surety he was also compelled to pay for him the sum of $200 plus $12 interests for an obligation due and unpaid, as shown by the document also copied into the complaint, for which amounts the defendant has also failed to reimburse him.
(3) That as the defendant’s surety he likewise paid the *100sum of $150 due on another obligation plus $7.50 interest, as shown by the document written in English and copied into the complaint, which amounts the defendant has also failed to pay him.
Appellant Miguel Castro Eivera demurred to the complaint on the ground of misjoinder of causes of action in that it includes three distinct causes of action by reason of the nature of the claims set up therein, the origin of contracts entered into at different-times and the source of the causes of action. He also alleged that for these reasons the complaint did not state' facts sufficient to constitute a cause of action.
The defendant did not appear on the day set for the hearing on the demurrer, and on motion by the plaintiff the court overruled the demurrer on the ground that it Avas frivolous and ordered that if within two days from the notification of the said ruling of the court the defendant failed to pay to Hie plaintiff $10 as costs for his appearance at the hearing on said demurrer and also to file an affidavit as to the sufficiency of his defense on the merits of the case, it would render judgment as prayed for in the complaint. This decision Avas based on District Court Rule 18.
After the defendant had been notified of the said decision and the time specified therein had expired, the plaintiff moved the court for judgment because the defendant had not complied Avith the conditions imposed upon him and had taken no steps to ansAver the complaint, Avhich motion the court sustained and entered judgment against the defendant for the $738.30 claimed, together Avith legal interest from the filing of the complaint, and costs, expenses, disbursements, and plaintiff’s attorney fees, from Avhich judgment the defendant took the present appeal.
The only allegation made by the appellant to sIioav that his demurrer Avas not frivolous, as A\ras held by the loAver court, is that in the first cause of action the plaintiff claims not only the $200 due according to the Avritten obligation but *101also $160.80 for costs, expenses, interest and attorney fees, notwithstanding the fact that he is not required to satisfy these costs, etc., according to the Act of March 12, 1908, amending sections 327 and 339 of the Code of Civil Procedure, because the amount of the obligation was less than $500 and, therefore, that two causes of action are now joined, one for the payment of the secured principal and the other for a payment unduly made, which require distinct defenses and do not refer to express or implied contracts, wherefore the appellant contends that they cannot be joined.
That the plea of misjoinder of causes of action for the reason stated is frivolous is shown by the same instrument which the appellant signed as principal and the appellee guaranteed as surety, for it expressly stipulates that in case the creditor should have to bring suit to recover the debt, both the debtor and his surety bound themselves to pay the attorney fees also, consequently the claims now made by Perea in that connection clearly arise from the same contract. Cintrón & Ahoy v. Solá, 22 P. R. R. 245.
The ground upon which the appellant bases his allegation that the complaint does not state facts sufficient to constitute a cause of action because there is copied into it a contract in' English without an accompanying translation and of which no notice was given to the defendant to enable him to defend himself, is also frivolous, for although section 34 of the Code of Civil Procedure, which the appellant considers violated, provides that written pleadings may be drafted in the English ianguage, but must be accompanied by the necessary number of copies in the Spanish language, as the appellee filed his pleading, the complaint, in Spanish, he did not violate that provision, for a document written in English and copied into the complaint is not a pleading, nor can the appellant contend that, being in that language, he could not defend himself against it, when, according to the complaint, he signed it in that language.
*102Having disposed of these questions, let ns examine the other regarding the conditions imposed by the court upon the defendant for allowing him to file an answer to the complaint.
Rule 18 of the district courts provides that when a party files a frivolous demurrer or motion with the sole intention of delaying a complaint or answer, he shall not be allowed to file another pleading except in the manner and form conditioned by the court, and shall be required also to file an affidavit of the merits of his action or defense.
In order to show that the ruling of the court imposing conditions upon him for filing an answer was illegal, the appellant cites section 139 of the Code of Civil Procedure, which provides in one of its paragraphs that when a demurrer to the complaint is overruled and no answer is filed the court may allow, upon such terms as may be just, an answer to be' filed. However, this same provision leaves it to the court to allow the answer to be filed upon such terms as may be just and authorizes it to impose conditions and is the source of rule 18 already referred to. It is clear that a court cannot prevent capriciously the filing of an answer after overruling a demurrer to the complaint, but if the demurrer is frivolous and interposed with the sole object of delaying the action, as in this case, according to section 139 itself it may impose the condition referred to in rule 18 for allowing another pleading to be filed. Generally, the rules of the court control this matter. Seale v. McLaughlin, 28 Cal. 672, and Gilles v. Hutchison, 16 Cal. 154.
The appellant also contends that the court could not impose upon him as one of the conditions for allowing him to file his answer to the complaint the payment of $10 as costs for the appearance at the hearing on thh demurrer, because the matter of the payment of attorney fees is governed by the Act of March 12, 1908, according to which the plaintiff could not recover said fees for the reason that the subject-matter of the first cause of action was less than $500.
*103As the three causes of action set up in the complaint may he joined, it is the total amount and not the amount of the various causes of action so joined that determines the jurisdiction of the court and its authority to include attorney fees in the costs. Besides, the right to exact the payment of the amount which the defendant owes the plaintiff does not flow from the said act but from rule 18 in its relation to section 139 of the Code of Civil Procedure.
The judgment appealed from should he
Affirmed.
Chief Justice Hernández and Justices Wolf and Hutchi-son concurred. Mr. Justice del Toro tool? no part in the decision of this case.