Update Import Billing & Invoice
This commit is contained in:
@@ -1,7 +1,24 @@
|
||||
const getLocalizedData = async (locale) => {
|
||||
const response = await fetch(`/lang/${locale}.json`); // Mengambil file lokal berdasarkan bahasa yang dipilih
|
||||
const data = await response.json();
|
||||
return data;
|
||||
// const getLocalizedData = async (locale) => {
|
||||
// const response = await fetch(`/lang/${locale}.json`); // Mengambil file lokal berdasarkan bahasa yang dipilih
|
||||
// const data = await response.json();
|
||||
// return data;
|
||||
// };
|
||||
|
||||
// export default getLocalizedData;
|
||||
|
||||
// LocalizationUtil.js
|
||||
import idID from './lang/id-ID.json';
|
||||
import enUS from './lang/en-US.json';
|
||||
|
||||
const localizedData = {
|
||||
'id-ID': idID,
|
||||
'en-US': enUS,
|
||||
// Tambahkan bahasa lain sesuai kebutuhan
|
||||
};
|
||||
|
||||
export default getLocalizedData;
|
||||
const getLocalizedData = async (locale) => {
|
||||
return localizedData[locale] || localizedData['id-ID'];
|
||||
};
|
||||
|
||||
export default getLocalizedData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user