Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

127
Views
Localizar i18n Siguiente js _página de error

Quiero tener una página de _error personalizada para mi proyecto Next js. Estoy usando el método getServerSideProps para localizar mis otras páginas, pero para la página _error no puedo traducir las cadenas, también intenté usar el método getStaticProps, pero no pude obtener ningún resultado diferente.

 const CustomError = ({ statusCode, hasGetInitialPropsRun, err, pageRootRef }) => { const { t } = useTranslation(["error", "common"]); return ( <Layout pageRootRef={pageRootRef}> <Head> <title>{t("title")}</title> </Head> <div id="_error" className="_error"> <div className="pt-5 pb-6"> <div className="max-w max-640"> <h1 className="mb-2 t-alignC">{t("heading")}</h1> <Hairline color="green" /> <div className="max-w max-128 mb-5"> <Image src={`${cdnAssetPrefix}/images/pete/pete-confused.png`} className="fit" alt="" width={128} height={137} /> </div> <p> {t("go-back-paragraph.go-back")}{" "} {t("go-back-paragraph.sign-in-again")} </p> <div className="t-alignC"> <Link href={LOGIN_URL}> <a className="btn-link btn-xl"> {t("go-back-paragraph.go-to-login")} </a> </Link> </div> </div> </div> </div> </Layout> ); }; export async function getStaticProps({locale}) { return { props: { ...(await serverSideTranslations(locale, ["error", "common"])) } } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!