Main Content

Magnolia Community Forums: Get help with Magnolia: Reload i18n message bundles


  • Mrye
    Mrye
    Full name: Yousoff Effendy
    Posts: 18
    Last post: Aug 29, 2017 9:35:29 AM
    Registered on: Sep 5, 2016
    Reload i18n message bundles
    #1 by Mrye on Mar 28, 2017 7:53:33 AM

    How can I reload new changes in i18n message bundles? I'm using Magnolia CE 5.5.2. Seems like they removed Dev Tools -> Reload i18n after 5.4.*.

  • creichenbach
    creichenbach
    Full name: Cedric Reichenbach
    Posts: 4
    Last post: May 19, 2017 11:13:09 AM
    Re: Reload i18n message bundles
    #2 by creichenbach on Mar 28, 2017 8:25:48 AM

    Hi Mrye,

    When all else fails, you can also do it from the Groovy console (dev > Groovy): info.magnolia.cms.i18n.MessagesManager.getInstance().reload()

    But note that MessagesManager#getInstance is deprecated and might stop working in future versions.

  • ahietala
    ahietala
    Full name: Antti Hietala
    Posts: 342
    Last post: Sep 14, 2017 11:48:40 AM
    Re: Reload i18n message bundles
    #3 by ahietala on Mar 28, 2017 8:30:08 AM

    The reload function was removed in 5.4.7 when a watcher for i18n properties files was added. Magnolia should pick up changes automatically provided that the files are in the correct directory.

    https://documentation.magnolia-cms.com/display/DOCS54/Release+notes+for+Magnolia+5.4.7#ReleasenotesforMagnolia5.4.7-ChangestotranslationfilesareseenbyMagnoliainstantly

    https://documentation.magnolia-cms.com/display/DOCS/i18n+best+practices

    --Antti

  • Mrye
    Mrye
    Full name: Yousoff Effendy
    Posts: 18
    Last post: Aug 29, 2017 9:35:29 AM
    Registered on: Sep 5, 2016
    Re: Reload i18n message bundles
    #4 by Mrye on Mar 28, 2017 9:04:39 AM

    Hi ahietala,

    Tested and seems like it didn't detect any changes on existing properties file.

    Editing of translation files doesn't trigger reload
    https://jira.magnolia-cms.com/browse/MAGNOLIA-6643

  • ahietala
    ahietala
    Full name: Antti Hietala
    Posts: 342
    Last post: Sep 14, 2017 11:48:40 AM
    Re: Reload i18n message bundles
    #5 by ahietala on Mar 28, 2017 9:29:47 AM

    Yousoff,

    If you think there's a bug in the i18n change detection mechanism, kindly enter a ticket into our JIRA. Please provide as much detail as you can, attaching your properties file and noting the directory where you store it. We'll try to reproduce the issue.

    https://documentation.magnolia-cms.com/display/DOCS/Support

    MAGNOLIA-6643 was fixed in 5.5.

    Thanks,
    Antti

  • Mrye
    Mrye
    Full name: Yousoff Effendy
    Posts: 18
    Last post: Aug 29, 2017 9:35:29 AM
    Registered on: Sep 5, 2016
    Re: Reload i18n message bundles
    #6 by Mrye on Mar 30, 2017 10:48:48 AM

    Hi creichenbach,

    I have use MessageManager.getInstance().reload() and it successfully refresh the i18n. However only the admin site can get the latest changes i18n i.e dialog.

    The template script however unable to get the latest changes. Is there anything that might cause this problem ?

  • creichenbach
    creichenbach
    Full name: Cedric Reichenbach
    Posts: 4
    Last post: May 19, 2017 11:13:09 AM
    Re: Reload i18n message bundles
    #7 by creichenbach on Mar 30, 2017 1:42:19 PM

    It's hard to tell from afar without further details, but here are a few things you may want to try:

    - Make sure caches have been cleaned, that is, browser cache and (depending on your setup) Magnolia caches
    - Check if languages match (of the content you're testing against and the i18n messages file)
    - If you haven't already, consult the docs page on different types of translatable content

  • Mrye
    Mrye
    Full name: Yousoff Effendy
    Posts: 18
    Last post: Aug 29, 2017 9:35:29 AM
    Registered on: Sep 5, 2016
    Re: Reload i18n message bundles
    #8 by Mrye on Mar 30, 2017 8:02:23 PM

    Hi creichenbach,

    Thanks! I just flush my caches and now it's working. I can now reload latest changes in i18n.

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/