• Blog
  • Documentation
  • Courses
  • Changelog
  • AI Starters
  • UI Kit
  • FAQ
  • Supamode
    New
  • Pricing

Launch your next SaaS in record time with Makerkit, a React SaaS Boilerplate for Next.js and Supabase.

Makerkit is a product of Makerkit Pte Ltd (registered in the Republic of Singapore)Company Registration No: 202407149CFor support or inquiries, please contact us

About
  • FAQ
  • Contact
  • Verify your Discord
  • Consultation
  • Open Source
  • Become an Affiliate
Product
  • Documentation
  • Blog
  • Changelog
  • UI Blocks
  • Figma UI Kit
  • AI SaaS Starters
License
  • Activate License
  • Upgrade License
  • Invite Member
Legal
  • Terms of License
    • Reactfire
    • useCurrentOrganization
    • useCurrentUserRole
    • useIsSubscriptionActive
    • useUserSession
    • withAppProps
    • withTranslationProps
    • withAuthProps
    • withPipe
    • withMethodsGuard
    • withAuthedUser
    • withExceptionFilter
    • withCsrf

withTranslationProps

The "withTranslationProps" is a function that is used to populate the props of pages that require translation.

This function is used to populate the translations of the application. All the other props functions include this by default, so you don't need to use it directly unless it's on a page that does not use any of the other ones.

You will be using this for the majority of your marketing pages.

tsx
import { withTranslationProps } from "~/lib/props/with-translation-props";
import { GetStaticPropsContext } from "next";
export async function getStaticProps(
context: GetStaticPropsContext
) {
const { props } = await withTranslationProps(context);
return {
props,
};
}