Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Refresh app.localize datas #2612


User avatar
0
jeromevoxteneo created

I use jtable to display custom localized entry like that:

name: {
                    title: app.localize('Name'),
                    width: '10%',
                    display: function (data) {
                            return app.localize(data.record.nameKey);
                    }
                },

NameKey is the key matching with the table AbpLanguageTexts

That's works fine until I want to change the value from my popup. When i click on save, the jtable is reloaded but the value returned by app.localize is still the previous value and not the updated one.

I was wondering if there is a way in the framework to force a refresh of the app.localize without the need to reload the whole page ? Or maybe a way to update one value of the object for the key that is updated?

Thanks,


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    ABP does not have such a feature but you can do it with pure javascript. Change the value like this using javascript

    abp.localization.values["AbpZeroTemplate"]["Dashboard"] = "Test...."
    

    "AbpZeroTemplate" is the localization source name and "Dashboard" is the localization key.

  • User Avatar
    0
    jeromevoxteneo created

    Hi,

    Ok will dot it this way.

    Thank you

  • User Avatar
    0
    danielkuhlmann created

    Hi, I copied content of AbpLanguageTexts from my Development database to Production database. But now my application in production doesn't start anymore, see attachment. What do I do wrong? Regards, Daniel

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @danielkuhlmann,

    Can you share file again ? I couldn't see attachment.

    Thanks.