๐๏ธ Routing
With NextGlobeGen, the application routes are created to a special src/app directory. In this directory all Next.js file-system based routing rules apply and all Next.js specific routing files work exactly the same as in src/app directory. Localized routes are generated to src/app/(i18n) directory based on the contents in the src/app origin directory.
๐๏ธ Components
NextGlobeGen provides Link and Form components that wrap the Next.js components with the same names. These can be used to navigate to localized pathnames.
๐๏ธ Hooks
NextGlobeGen provides multiple hooks that help you with the internationalization requirements of the application. Most of the hooks work interchangeably in Client and Server Components but some can be used only in Client Components.
๐๏ธ Functions
These functions are designed for server context only. Since there are different functions for various purposes, make sure to check each one to understand its specific application.
๐๏ธ Plugin
The NextGlobeGen Plugin needs to be enabled in Next.js configuration file. It sets up the required import aliases for the package to work correctly. It also regenerates the localized routes, messages and the types for the package when changes are made in the source code.
๐๏ธ Middleware
The NextGlobeGen middleware can be enabled in middleware.ts file. The middleware handles locale negotiation and adds alternate links of the page to the response headers.
๐๏ธ Configuration
NextGlobeGen can be configured through an i18n.config.ts file in the root of your project directory with a default export.
๐๏ธ CLI
NextGlobeGen comes with a Command Line Interface (CLI) tool next-globe-gen. To see all the available commands run the CLI tool with the -h or --help option.