duandaoji3992 2019-07-04 17:05
浏览 44

Laravel 5.8:在变形器中复制短语

How can I add a rule to the inflector for pluralization of Spanish phrases?

I have the following problem: I have a model called "Tipo de servicio (TipoDeServicio)". "Type of service" in English, and the plural in Spanish is "Tipos De Servicio (TiposDeServicio)" but the inflector creates "Tipo De Servicios (TipoDeServicios)", I have added several Spanish words in the irregular array to a ServiceProvider that extends from the inflector class, and the pluralization for words works well, but the order in which the pluralization is applied in the phrases is wrong, it is applied as it is done with the English grammar.

How can I create a rule to apply pluralization to a Spanish phrase?

Thank you.

Laravel 5.8, PHP 7.2

  • 写回答

0条回答 默认 最新

    报告相同问题?