AJ's blog

April 19, 2014

ASP.NET MVC I18n – Part 10: Finish

Filed under: .NET, .NET Framework, ASP.NET MVC, HTML5, Internationalization — ajdotnet @ 4:09 pm

This is it. The complete overview of localizing a regular MVC based web application.

Here’s what we covered in this series, shown in context. The image contains links to the respective posts:


Quite some content for a rather common demand…

 

….and still, there’s some ground I did not cover:

right-to-left.

This is the one thing regarding localization I avoided. The reason is simple: I don‘t know enough about this topic.

Technically there is the dir attribute in HTML and a respective direction property in CSS. But beyond that I would also want to know how RTL affects the screen layout, tab order, etc..

WebAPI.

Not much to say. WebAPI controllers participate in the scheme we have set up, so the controller is aware what culture the user prefers. The data serialization itself ignores the culture, thus data exchange at the raw level (JSON) is not even affected.

Client side localization.

Apart from a few hints regarding client side validation (which is specifically supported by MVC via unobtrusive validation), everything I presented basically happened on the server.

So, if you build your application using Knockout, Angular, Sencha, or other frameworks – which generate large chunks of the UI employing databinding strategies – you will need to localize on the client as well. The server may still provide the necessary backing in terms of logic and translations e.g. as JSON service.

And JavaScript itself is still evolving.

“App” development.

Taking „client side“ one step further and building container applications based on PhoneGrap/Cordova, you will have to provide everything on the client; you just cannot afford to not render the UI just because the device has no connection right now. Thus you’ll need to address localization completely on the client, functionality as well as information; no server backing in this case, sorry.

Data localization.

For an application used internationally, it may not be sufficient to just localize the UI. You may have to localize your actual data. Formats, content, even business rules.

This may include providing downloadable content in different languages. (That exposé just became a collection, rather than a single file.) Take the different naming schemes into account. International addresses? Have fun. Types of business entities. Currencies, calendars, other units of measurement. (Thank god, we‘re talking about business applications; historians have to deal with the really funny stuff… . (Some people actually think IBAN and BIC are simple… .)

 

Well, I’m going to leave these topics for someone else. And with that, I conclude this little series. You can find the sources of the sample I built for this series on github (VS2013 project, NuGet packages have to be restored using “Enable NuGet Package Restore”, IIS Express is expected).

 

That’s all for now folks,
AJ.NET

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: