How to find the correct JSON translation file for each page

In this tutorial, we’ll show you how to find and properly translate your site using the proper json files.

NOTE: This is Part 2 of the tutorial on translation. You can refer to the previous tutorial HERE.

Step 1: Refer to the Table to find out which json file to use depending on which page you want to translate

 

URL Path Controller Translation Json
/ HomeCtrl home-page.json
/login LoginCtrl,
RegisterCtrl
login.json
/authenticate/forgot/ ResetPasswordCtrl login.json
/account/email/confirm/ confirmEmailCtrl confirm-email.json
/start StartCtrl.js startCampaign.json
/getstarted,
/campaign-setup,
/rewards,
/profile-setup,
/complete-funding,
/campaign-preview
CreateCampaignCtrl getStarted.json,
campaignStep.json,
user-profile.json,
complete-funding.json,
campaign-preview.json,
campaign-page.json
/inline-contribution InlineContributionCtrl guest-contribution.json
/pledge-campaign PledgeCampaginCtrl pledge-campaign.json
/pledge-retry RetryCardCtrl retry-card.json
/pledge-history PledgeHistoryCtrl pledge-history.json
/explore ExploreCtrl explore.json
/campaign,
/custom-page
CampaignCtrl,
CustomPageCtrl
campaign-page.json,
custom-comment.json
/profile-setup userProfileCtrl user-profile.json
/admin/dashboard PortalSettingCtrl portal-setting.json
/campaign-review/ campaignReviewCtrl campaign-review.json
/profile ProfileCtrl profile.json,
login.json
/profile-setting ProfileSettingCtrl profile-setting.json
/campaign-manager CampaignManagementCtrl campaign-management.json
/payment-setting Payment Settings payment-setting.json
/campaign-manager/stream-management/ CampaignManagementCtrl,
StreamManageCtrl
stream-management
campaign-manager/transactions/ TransactionDetailsCtrl transaction-management
/message-center message-center message-center.json
/admin/dashboard AdminPortalSettingsCtrl portal-setting.json,
tab-report.json,
tab-user.json,
tab-category.json,
tab-campaign.json,
tab-page.json,
tab-portalSetting.json,
tab-api.json,
tab-email.json

For example, the Home page ( / ) is using the homepage.json file for translation and the Login page is using the login.json file.

Step 2: Find the json files

All the json files should be located in angapp/views/translation/{language}

Remember, it’s a json file, so it’s important to maintain the proper data structure.

Step 2b: Global json files

These json files are accessed by all pages:

globaltranslation

If you can’t find the translation string you’re looking for, chances are they’re in one of these files instead. These are usually reserved for strings that appear multiple times throughout the site.

For example, the “Please Confirm” string for the Terms of Service Agreement would be found here, in global.json.