Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT Security NachrichtenKI-Agenten hebeln klassisches IT-Asset-Management aus(24.09.2026 um 07:14 Uhr)
IT Security NachrichtenMicrosoft erneuert Surface Pro und Laptop mit Snapdragon X2 Plus(24.09.2026 um 07:42 Uhr)
IT Security DownloadsGitHub Release: cline/cline vsdk/shared/v0.0.86 (24.09.2026)(24.09.2026 um 07:43 Uhr)
IT Security DownloadsGitHub Release: cline/cline vsdk/llms/v0.0.86 (24.09.2026)(24.09.2026 um 07:43 Uhr)
IT Security DownloadsGitHub Release: cline/cline vsdk/agents/v0.0.86 (24.09.2026)(24.09.2026 um 07:43 Uhr)
IT Security DownloadsGitHub Release: cline/cline vsdk/core/v0.0.86 (24.09.2026)(24.09.2026 um 07:43 Uhr)
IT Security DownloadsGitHub Release: cline/cline vcli-v3.0.65 (24.09.2026)(24.09.2026 um 07:54 Uhr)
IT Security NachrichtenKI-Agenten hebeln klassisches IT-Asset-Management aus(24.09.2026 um 07:14 Uhr)
IT Security NachrichtenMicrosoft erneuert Surface Pro und Laptop mit Snapdragon X2 Plus(24.09.2026 um 07:42 Uhr)
IT Security DownloadsGitHub Release: cline/cline vsdk/shared/v0.0.86 (24.09.2026)(24.09.2026 um 07:43 Uhr)
IT Security DownloadsGitHub Release: cline/cline vsdk/llms/v0.0.86 (24.09.2026)(24.09.2026 um 07:43 Uhr)
IT Security DownloadsGitHub Release: cline/cline vsdk/agents/v0.0.86 (24.09.2026)(24.09.2026 um 07:43 Uhr)
IT Security DownloadsGitHub Release: cline/cline vsdk/core/v0.0.86 (24.09.2026)(24.09.2026 um 07:43 Uhr)
IT Security DownloadsGitHub Release: cline/cline vcli-v3.0.65 (24.09.2026)(24.09.2026 um 07:54 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Add Localization Translate to React App with redux (without i18next)

How to Add Localization to a React App with Redux and Ant Design (without react-i18next) GitHub Repo : https://github.com/idurar/idurar-erp-crm Localization is the process of translating your application into different languages. In…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




How to Add Localization to a React App with Redux and Ant Design (without react-i18next)



GitHub Repo : https://github.com/idurar/idurar-erp-crm



Localization is the process of translating your application into different languages. In this article, we will learn how to add localization support to a React app using Redux and Ant Design, without using react-i18next.






Check Video on youtube :



Add Localization Translate to React App with redux (without i18next)






Step 1: Setup Redux



First, let's set up Redux in our React app. If you haven't already, install the necessary dependencies:




npm install redux react-redux






Next, create a new file called store.js and import the required Redux modules:




import { createStore } from 'redux';
import { Provider } from 'react-redux';






Create a Action function to handle the localization state:




import * as actionTypes from './types';

import languages from '@/locale/languages';

async function fetchTranslation() {
try {
let translation = await import('@/locale/translation/translation');
return translation.default;
} catch (error) {
console.error(
'Error fetching translation file :~ file: actions.js:7 ~ fetchTranslation ~ fetchTranslation:',
error
);
}
}

export const translateAction = {
resetState: () => (dispatch) => {
dispatch({
type: actionTypes.RESET_STATE,
});
},
translate: (value) => async (dispatch) => {
dispatch({
type: actionTypes.REQUEST_LOADING,
});
const translation = await fetchTranslation();
let data = await translation[value];

const isRtl = languages.find((l) => l.value === value).isRtl || false;
const LANG_STATE = {
result: data,
isRtl: isRtl,
langDirection: isRtl ? 'rtl' : 'ltr',
langCode: value,
isLoading: false,
isSuccess: false,
};
window.localStorage.setItem('translate', JSON.stringify(LANG_STATE));
if (data) {
dispatch({
type: actionTypes.REQUEST_SUCCESS,
payload: data,
langCode: value,
isRtl: isRtl,
});
} else {
dispatch({
type: actionTypes.REQUEST_FAILED,
});
}
},
};







Create the Redux store using the reducer:




const store = createStore(localizationReducer);






Wrap your root component with the Provider component from react-redux, passing the Redux store as a prop:




ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root')
);









Step 2: Install Ant Design



Install Ant Design by running the following command:




npm install antd






Import the necessary components from Ant Design in your desired component:




import { ConfigProvider, Button } from 'antd';
import { useSelector, useDispatch } from 'react-redux';






Configure Ant Design to use the correct locale by adding the following code at the top of your component:




const { locale } = useSelector((state) => state.localization);
const dispatch = useDispatch();









Step 3: Create Language Files



Create language files for each supported language in a directory called locales. For example, create an en.js file with the following content:




export default {
edit: "Modifier",
save: "Sauvegarder",
cancel: "Annuler",
delete: "Supprimer",
create: "Créer",
update: "Mettre à jour",
search: "Rechercher",
select: "Sélectionner",
view: "Voir",
submit: "Soumettre",
add: "Ajouter",
...
}






Create a similar file for other languages. Make sure to export the translations as an object.






Step 4: Implement Translation Component



Create a new hooks called useLanguage:




import { useSelector } from 'react-redux';

import { selectCurrentLang } from '@/redux/translate/selectors';

const getLabel = (lang, key) => {
try {
const lowerCaseKey = key
.toLowerCase()
.replace(/[^a-zA-Z0-9]/g, '_')
.replace(/ /g, '_');

if (lang[lowerCaseKey]) return lang[lowerCaseKey];
else {
// convert no found language label key to label

const remove_underscore_fromKey = lowerCaseKey.replace(/_/g, ' ').split(' ');

const conversionOfAllFirstCharacterofEachWord = remove_underscore_fromKey.map(
(word) => word[0].toUpperCase() + word.substring(1)
);

const label = conversionOfAllFirstCharacterofEachWord.join(' ');

const result = window.localStorage.getItem('lang');
if (!result) {
let list = {};
list[lowerCaseKey] = label;
window.localStorage.setItem('lang', JSON.stringify(list));
} else {
let list = { ...JSON.parse(result) };
list[lowerCaseKey] = label;
window.localStorage.removeItem('lang');
window.localStorage.setItem('lang', JSON.stringify(list));
}

return label;
}
} catch (error) {
return 'No translate';
}
};

const useLanguage = () => {
const lang = useSelector(selectCurrentLang);

const translate = (value) => getLabel(lang, value);

return translate;
};

export default useLanguage;










Step 5: Connect Redux and Ant Design



In your main App component, import the Translation component and render it within the ConfigProvider component from Ant Design:




import { useDispatch, useSelector } from 'react-redux';

import languages from '@/locale/languages';
import { selectLangCode } from '@/redux/translate/selectors';

import { translateAction } from '@/redux/translate/actions';

import useLanguage from '@/locale/useLanguage';

import { Select } from 'antd';

const SelectLanguage = () => {
const translate = useLanguage();
const dispatch = useDispatch();

const langCode = useSelector(selectLangCode);

return (
<>
<label
htmlFor="rc_select_1"
className="hiddenLabel"
style={{
width: '0px',
marginRight: '-20px',
position: 'relative',
}}
>
_
</label>
<Select
showSearch
placeholder={translate('select language')}
value={langCode}
defaultOpen={false}
style={{
width: '120px',
float: 'right',
marginTop: '5px',
cursor: 'pointer',
}}
optionFilterProp="children"
filterOption={(input, option) => (option?.label ?? '').includes(input.toLowerCase())}
filterSort={(optionA, optionB) =>
(optionA?.label ?? '').toLowerCase().startsWith((optionB?.label ?? '').toLowerCase())
}
onSelect={(value) => {
dispatch(translateAction.translate(value));
}}
>
{languages.map((language) => (
<Select.Option
key={language.value}
value={language.value}
label={language.label.toLowerCase()}
disabled={language.disabled}
>
<div className="demo-option-label-item">
<span role="img" aria-label={language.label}>
{language.icon}
</span>
{language.label}
</div>
</Select.Option>
))}
</Select>
</>
);
};

export default SelectLanguage;







Now, when you click on the "English" or "French" button, the localization of your app will change accordingly.



That's it! You have successfully added localization support to your React app using Redux and Ant Design without using react-i18next. You can now expand on this by adding more languages and translations as needed.



I hope this article helps you achieve your goal. Let me know if you need any further assistance!



Open Source ERP CRM

SOC Incident Playbook: Remote Code Execution (RCE) Defense
title: Detect Exploitation - Add Localization Translate to React App with redux (without i18next)
id: 17de0b78-c6c2-4517-9244-b00c9ae5ae1c
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "Add Localization Translate to " ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Add Localization Translate to React App .... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Add Localization Translate to React App with redux (without i18next)

Thematisch verwandte Begriffe: Localization, Translate, React, with · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96676 | A vulnerability was identified in Fast FAC1900R 20190827_2.0.2. The impa…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick