I created a translation system for fun that reads all trans ()
/ :: Call (app)
in my app and present them with their current translations in localization files in resources / lang
, so that an administrator user can translate a new localized localization You can update the file on the fly.
Everything has to work, but there is a little annoyance: the form is sent every time and the localization file is updated, the page reloads (a redirect () -> Via; route ()
calls, such as redirect () -> back ()
), but most of the time, it displays the old information even if the file is properly updated Have happened
If I refresh, changes appear after 0.5-5 seconds, so I think this is a cache problem. So the question is: When I am in the translation system, or can I ignore a language cache in another / or smart way? I tried sleeping for a few seconds, but it made the user experience dirty.
I 'got the same issue.
I added my controller to sleep and additional information refresh the page from JS.
Sleep (2); Return () - & gt; Back ("refresh", "yes");
And then in my opinion:
@if (session ('refresh')) & lt; Script & gt; Location.reload (true); & Lt; / Script & gt; @endif
I know that this is a stupid solution but it works. If someone knows the best way to do this, please write me a comment.
No comments:
Post a Comment