Join Chris Woodruff for an in-depth discussion in this video Modify the views, part of ASP.NET Core: Internationalization.
- [Narrator] And let's go on to modify the view.…We're going to modify the contact view.…And what we have to do with the view now,…instead of just taking the data…from the view data construct,…we actually have to inject the localizer into each view…so that each view can work with the localizer…to get the content it needs.…So first, we need to do a using clause…and pull in Microsoft…dot AspNetCorp…dot MVC dot Localization.…
And next, the most important part of this…is we have to inject…our I-view localizer.…We're going to call that localizer.…The next thing we need to do is fill…in the view data construct.…(typing)…Okay now that we have our ViewBag filled in,…let's use that data.…
I'm going to come in and replace all…of the hard coated labels and text on the view…with their corresponding view data values.…(typing)…Okay, again, let's save our file.…Let's open up our integrated terminal,…run the application, and see the results.…
Let's open up our application in our browser.…We can see that we have our contact up in the menu,…
- Globalization and localization
- Internationalization considerations
- Creating the ASP.NET Core project
- Using the HTTP Accept-Language header
- Using the ASP.NET Core store project
- Displaying content with the controller
- Modifying the views
- Selecting a culture with cookies
- Systems of measurement formats
Skill Level Intermediate
ASP.NET Core: Test-Driven Developmentwith Richard Rout37m 30s Intermediate
1. Introduction to Internationalization
2. Strategies for Internationalization
3. ASP.NET Core Configuration for Internationalization
4. Custom Internationalization
Next steps1m 7s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.