Customize UI labels using Internationalization (i18n) files

87 views
Skip to first unread message

Lewatle Johannes Phaladi

unread,
Jun 15, 2022, 5:11:27 AM6/15/22
to DSpace Technical Support
Dear Dspace Colleagues,

On DSpace 7.2 I am trying to change wording from frontend, where it says
"Communities in DSpace" to "Communities in WIReDSpace-EXTRA"


I have edited this file :
/dspace-7.2/src/assets/i18n/en.json5
line edited 
  "home.top-level-communities.head": "Communities in WIReDSpace-EXTRA",


and then run this cmd

$ pm2 restart dspace-ui.json  from ui deploy directory 

No changes happened on frontend please assist.

Regards,
Lewatle 

Tim Donohue

unread,
Jun 15, 2022, 6:12:33 PM6/15/22
to DSpace Technical Support
Hi Lewatle,

You will need to rebuild the UI whenever you make changes to the i18n files:
"yarn build:prod"

This ensures that the updated files are placed in the proper location in the "dist" folder (distribution folder), but also creates zipped up / minified versions of these *.json5 files for better performance in the UI.

After rebuilding, then run your "pm2 restart" command, and it should all work.

Tim

Lewatle Johannes Phaladi

unread,
Jun 17, 2022, 3:50:05 AM6/17/22
to DSpace Technical Support
Hi Tim,

Thanks, changes applied and one thing I have noted is that since I have copied config and dist to deploy directory when started with the upgrade,  this changes also was not taking place because dist directory inside deploy was old and after running build I have to copy new dist directory to replace the one in deploy location, do I need to make symbolic link to dist directory in dspace-angular, so that after building software didt folder in deploy doesn't need to manually replaced.

Regards,
Lewatle 

Lewatle Johannes Phaladi

unread,
Jun 20, 2022, 1:59:16 AM6/20/22
to DSpace Technical Support
Thanks a lot Tim I will create zip!

On Thursday, 16 June 2022 at 00:12:33 UTC+2 Tim Donohue wrote:
Reply all
Reply to author
Forward
0 new messages