/** * Sets a translation catalog instance on the object. * * @param CatalogInterface $catalog A translation catalog object. * @return PhpError Chainable */ public function setCatalog(CatalogInterface $catalog) { parent::setCatalog($catalog); $messages = ['generic-error' => ['en' => 'A website error has occurred. Sorry for the temporary inconvenience.', 'fr' => 'Une erreur de site a eu lieu. Désolé pour le désagrément temporaire.', 'es' => 'Se ha producido un error de página web. Disculpa las molestias temporales.']]; foreach ($messages as $key => $entry) { if (!$this->catalog()->hasEntry($key)) { $this->catalog()->addEntry($key, $entry); } } return $this; }
/** * Sets a translation catalog instance on the object. * * @param CatalogInterface $catalog A translation catalog object. * @return NotAllowed Chainable */ public function setCatalog(CatalogInterface $catalog) { parent::setCatalog($catalog); $messages = ['method-not-allowed' => ['en' => 'Method not allowed.', 'fr' => 'Méthode non autorisée.', 'es' => 'Método no permitido.'], 'allowed-methods-1' => ['en' => 'Allowed methods:', 'fr' => 'Méthodes permises:', 'es' => 'Métodos permitidos:'], 'allowed-methods-2' => ['en' => 'Method not allowed. Must be one of:', 'fr' => 'Méthode non autorisée. Doit être:', 'es' => 'Método no permitido. Debe ser uno de:']]; foreach ($messages as $key => $entry) { if (!$this->catalog()->hasEntry($key)) { $this->catalog()->addEntry($key, $entry); } } return $this; }
/** * Sets a translation catalog instance on the object. * * @param CatalogInterface $catalog A translation catalog object. * @return NotFound Chainable */ public function setCatalog(CatalogInterface $catalog) { parent::setCatalog($catalog); $messages = ['page-not-found' => ['en' => 'Page Not Found', 'fr' => 'Page Introuvable', 'es' => 'Página No Encontrada'], 'not-found' => ['en' => 'Not Found', 'fr' => 'Introuvable', 'es' => 'No Encontrado'], 'visit-home-page' => ['en' => 'Visit the Home Page', 'fr' => 'Visitez la page d’accueil', 'es' => 'Visita la página de inicio'], 'page-not-found-description' => ['en' => 'The page you are looking for could not be found. ' . 'Check the address bar to ensure your URL is spelled correctly. ' . 'If all else fails, you can visit our home page at the link below.', 'fr' => 'La page que vous recherchez n’a pu être trouvée. ' . 'Vérifiez la barre d’adresse pour assurer que votre URL est correctement orthographié. ' . 'Si rien ne fonctionne, vous pouvez visiter notre page d’accueil au lien ci-dessous.', 'es' => 'La página que estás buscando no se pudo encontrar. ' . 'Compruebe la barra de direcciones para asegurarse de que su URL está escrito correctamente. ' . 'Si todo lo demás falla, se puede visitar la página de inicio en el siguiente enlace.']]; foreach ($messages as $key => $entry) { if (!$this->catalog()->hasEntry($key)) { $this->catalog()->addEntry($key, $entry); } } return $this; }
/** * Sets a translation catalog instance on the object. * * @param CatalogInterface $catalog A translation catalog object. * @return Shutdown Chainable */ public function setCatalog(CatalogInterface $catalog) { parent::setCatalog($catalog); $messages = ['down-for-maintenance' => ['en' => 'Down for maintenance!', 'fr' => 'En maintenance!', 'es' => '¡Fuera de servicio por mantenimiento!'], 'currently-unavailable' => ['en' => 'We are currently unavailable. Check back in 15 minutes.', 'fr' => 'Nous sommes actuellement indisponible. Revenez en 15 minutes.', 'es' => 'Estamos actualmente fuera de servicio. Vuelve en 15 minutos.']]; foreach ($messages as $key => $entry) { if (!$this->catalog()->hasEntry($key)) { $this->catalog()->addEntry($key, $entry); } } return $this; }