
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-multilingual-content
Advanced tools
A light package that provides a component to translate a website's content present in english/native language into other languages.
A light package that provides a component to translate a website's content present in english/native language into other languages.
V 2.0 Update: There is a change in the way select styles are handled now. (Fixes the older issue of styles being lost on re-render) Refer new examples here
npm i react-multilingual-content
Youtube link: https://www.youtube.com/watch?v=F18wgoV9ulc (outdated)
Refer the example syntax below
This component needs to be on the client side if you're using Next.js
import GoogleTranslator from "react-multilingual-content";
<GoogleTranslator className="max-w-[150px]" />
You can style the unstyled GoogleTranslator Component, just like any other element in your application, by passing in className={classnames here}
Example:
<GoogleTranslator className="max-w-[150px]" />
The styles specified by the classes passed with the prop className are applied to the wrapper div.
You can style the select present inside the wrapper div by passing in styles as string to the selectStyles prop
Example 1:
// pass in selectStyles to apply styles on the select element (follow vanilla css syntax)
<GoogleTranslator
className="max-w-[200px]"
selectStyles="background-color: gray"
/>
Example 2:
// pass multiple selectStyles as a string to apply styles on the select element (follow vanilla css syntax)
<GoogleTranslator
className="max-w-[200px]"
selectStyles="background-color: gray; color: yellow; border: 2px solid black;"
/>
You can always add wrapper divs or pass this component as props to other functions, make sure to keep in mind the Component has a wrapper div, so to prevent hydration issues, don't use this component inside <p></p> or <span></span> and other hydration prevention rules apply.
selectClassName is replaced with selectStyles

)
You can pass in array of langauges you wanna show as options in the select element, for users to shift the content of the page to.
FAQs
A light package that provides a component to translate a website's content present in english/native language into other languages.
We found that react-multilingual-content demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.