Multilingual logic #40
Unanswered
rathorevaibhav
asked this question in
Software Principles
Replies: 1 comment
-
@rathorevaibhav // getting the language data
async function fetchLanguages() {
const response = await ApiInstance.get('/languages')
return response.data.languages
}
function ConvertLanguage(languagesData) {
//here the code for transform the language data into the format
}
// and then from below one we call the both fetchLanguages and ConvertLanguages
export function getAllLanguages() {
const languagesData = fetchLanguages()
const languages = ConvertLanguage(languagesData)
return languages
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Questions
In the following JS code:
Beta Was this translation helpful? Give feedback.
All reactions