
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
medusa-plugin-localization
Advanced tools
Meudsa localization plugin, supports deepseek automatic translation
The medusa-plugin-localization is a localization plugin for Medusa v2. The plugin stores localized content in the product's metadata. The frontend displays the localized language based on the current language setting. The plugin also supports automatic translation of localized languages using DeepSeek (requiring a DeepSeek API key). If no API key is available, localized languages need to be stored separately
"@medusajs/medusa": "2.7.0+",
npm i medusa-plugin-localization
If an SEO section is added to the metadata, DeepSeek's API will automatically include it in the multilingual translation process
| name | value | description |
|---|---|---|
| seo | {"title":"xxx","description":"xxx"} | for page keyword optimization |
| locale | {"en-GB":{"title":"...","seo_title":"..."}} | multiple languages via deepseek or manually written |
modules: [
{
resolve: "./src/modules/deepseek",
options: {
api_key: process.env.DEEPSEEK_API_KEY, // Not required
},
}
]
For frontend localization, I use next-intl(Doc:Without-i18n-routing) and retrieve the current locale value with const locale = await getLocale();. Then I specifically developed a <I18nTitle metadata={product.metadata} defaultTitle={product.title} /> component to render the title value.
import { getLocale } from 'next-intl/server';
type I18nTitleProps = {
metadata: Record<string, unknown> | null | undefined;
defaultTitle: string;
}
const I18nTitle = async ({ metadata, defaultTitle }: I18nTitleProps) => {
const locale = await getLocale();
if (!metadata || !metadata?.locale) return defaultTitle
try {
const localeMaps = JSON.parse(metadata?.locale as string) || {}
return localeMaps[locale]?.title || defaultTitle
} catch (_) {
return defaultTitle
}
}
export default I18nTitle;
// src/modules/products/templates/product-info/index.tsx
// Before
<Heading level="h2" className="text-3xl leading-10 text-ui-fg-base" >
{product.title}
</Heading>
// After
<Heading level="h2" className="text-3xl leading-10 text-ui-fg-base" >
<I18nTitle metadata={product.metadata} defaultTitle={product.title} />
</Heading>
Create Function @/lib/util/get-i18n
import { getLocale } from "next-intl/server";
async function getI18n(metadata: { locale?: string } | null | undefined): Promise<Record<string, string> | null> {
if (!metadata || !metadata.locale) {
return null;
}
const localeCode = await getLocale();
try {
const localeObj = JSON.parse(metadata.locale);
return localeObj[localeCode]
} catch (e) {
return null
}
}
export default getI18n;
generateMetadata Usingexport async function generateMetadata(props: Props): Promise<Metadata> {
// ...
const localeData = await getI18n(product.metadata);
if (localeData) {
return {
title: localeData.title?localeData.title:product.title,
description: localeData.description?localeData.description:product.description,
openGraph: {
title: localeData.title?localeData.title:product.title,
description: localeData.title?localeData.description:product.description||'',
images: product.thumbnail ? [product.thumbnail] : [],
},
}
}
return {
title: `${product.title} `,
description: `${product.title}`,
openGraph: {
title: `${product.title}`,
description: `${product.title}`,
images: product.thumbnail ? [product.thumbnail] : [],
},
}
}
FAQs
Meudsa localization plugin, supports deepseek automatic translation
The npm package medusa-plugin-localization receives a total of 18 weekly downloads. As such, medusa-plugin-localization popularity was classified as not popular.
We found that medusa-plugin-localization demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.