Internationalization / i18n (React)
You want to internationalize your product but your strings are hard-coded in-app in English. With Configly, translators directly place translations in a CMS-like web dashboard. Pull the values down to all your apps with turnkey, lean, and optimized client libraries.
Code Example
Store and update translated text in Configly
You can put all of your translations directly into Configly via the CMS-like web dashboard.
Updating translations is trivial and can be done without deploying. Translators themselves can update the copy without leaning on developers.
No more hunting translation files for orphaned strings as they are all located in one centralized place.
/* React in JavaScript / Typescript */
import * as React from 'react';
import {ConfiglyText, ConfiglyContext} from 'configly-react';
// This is a dummy function for illustration.
const getLocale = () => {
return "es";
}
export const App = () => {
const locale = getLocale();
const headerKey = `${locale}_header_text`;
const paragraphKey = `${locale}_paragraph_text`;
return (
<ConfiglyContext.Provider value={{apiKey: 'Dem0apiKEY'}}>
<div>
<h2><ConfiglyText prop={headerKey} /></h2>
<p><ConfiglyText prop={paragraphKey} /></p>
</div>
</ConfiglyContext.Provider>
);
}
Here, we showcase a React app. You can fetch the strings via our components or using the Configly hook (not shown).
Since Configly has support in many technologies, you can use a similar pattern with other languages so your translations across-client are all stored in one single place.