
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
gt-next is a powerful internationalization library designed for Next.js applications. It replaces your existing localization library, and integrates with generaltranslation.com for translations.
See our docs for more information including guides, examples, and API references.
Install gt-next
via npm:
npm install gt-next
npm install gt-next-cli --save-dev
Add the following environment variables to your .env
file:
GT_API_KEY="your-api-key"
GT_PROJECT_ID="your-project-id"
API Key
and Project ID
from the General Translation Dashboard.withGTConfig()
pluginAdd withGTConfig()
to your next.config.js
file.
You can specify the languages you want to support by passing an array of locale codes.
import { withGTConfig } from 'gt-next/config';
const nextConfig = {};
export default withGTConfig(nextConfig, {
locales: ['pt', 'es'], // Support for Portuguese and Spanish
swcPluginOptions: {
logLevel: 'silent', // Control warning output
compileTimeHash: false, // Enable compile-time optimizations
},
});
<T>
componentWrap any nested JSX content in the <T>
component to make it translatable.
For more information, check out this guide on using <T>
components.
import { T } from 'gt-next';
export default function Example() {
return (
<T>
<p>This gets translated.</p>
</T>
);
}
Use the <Var>
component to designate JSX content that should not be translated.
import { T, Var } from 'gt-next';
export default function Example() {
return (
<T>
<p>
This gets translated. <Var>This does not.</Var>
</p>
</T>
);
}
Tip:
To save time, run the setup command.
It will scan your codebase for translatable JSX and insert the <T>
tags for you.
npx gt-next-cli setup
Strings:
For strings, you can use useGT()
or getGT()
for translation.
For more information, check out this guide.
Full documentation, including guides, examples, and API references, can be found at General Translation Docs.
We welcome any contributions to our libraries. Please submit a pull request!
For Rust development (SWC plugin):
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add WebAssembly target
rustup target add wasm32-wasip1
# Install dependencies and build
npm run build:swc-plugin
FAQs
A Next.js library for automatic internationalization.
The npm package gt-next receives a total of 1,611 weekly downloads. As such, gt-next popularity was classified as popular.
We found that gt-next demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.