How to reload files

How to reload files
0.0 0

#1

Hi,

In my application what I am doing is that I have a dropdown for locale selection and I am changing the UI based on the dropdown selection.

Issue-> I have some files which are loaded when the app loads and when I choose another locale from dropdown those files are not reloaded.

Is there any option to load those files(I have a callback where I can specify that) other than the page reload?

Thanks
Gaurav Balyan


#2

“some files which are loaded”?

This doesn’t mean anything to me.


#3

You will need to give us more details about what you mean by files which are loaded. What kind of files are being loaded?

Do you have a link to your project? It might help us better understand what you are trying to do.


#4

Thanks for the replies let me try to reiterate my issue, I have three files (french.js,chinese.js and english.js) which are loaded initially.

I am using counterpart library for locale change what it does is load the appropriate file according to the locale selected by user.

My issue is that if I have selected english locale it is displaying UI in english but if I have changed the locale it is not able to load the relevant file.

Thanks


#5

Since you have not shared your code, I can only guess that each of these files contains a set of functions with the same names and since you load your english.js last, that is the only set of functions it is using. Try changing the order in which you load the files, to see if anything changes and check your console for errors.

If nothing changes, then definitely post a link to your project code, so we can investigate further for you.