Views: 4318
Number of votes: 6
Average rating:

Language files Visual Studio Extension for EPiServer

As you certainly know, EPiServer localization is based on XML files with a certain structure. Working with translations in code is not hard, but I believe it could be even easier with a small extension, that I am going to introduce to you. This is a Visual Studio 2010 extension that has three main functions:

  1. Show values of translation keys as a tool-tips.
  2. Navigate to a line in a language file containing the key.
  3. Copy to the clipboard an expression with path to the key selected in a language file.


In code editor all recognized translation keys are decorated with a thin border.  Tool-tips are shown if you hover a mouse pointer over a decorated translation key. Smart-tags used for navigation can be expanded with left mouse click or by pressing "Ctrl + ." key combination.

The extension can recognize two types of translation references: basic XPath “/admin/settings/heading” and resource binding <%$ Resources: EPiServer, admin.settings.heading %>. Relative paths like Translate(“#heading”) and filtering by attribute value expressions  like Translate(“/pagetypes/property[@name=’Description’]”) are not supported for now.

The extension can be installed from Extension Manager in Visual Studio 2010 (select Online gallery and type “EPiServer” in the search request) or alternatively it can be downloaded from this page.  The source code for the extension is available here.

This project was born during a series of hack-days that we have here in EPiServer development team and it is not an official EPiServer release. You are very welcome to leave feedback and suggestions here in comments or on extensions page. Bugs can be reported and tracked here.

Jan 29, 2012

valdis
(By valdis, 1/30/2012 3:27:23 PM)

cool!

lee.crowe
(By lee.crowe, 1/30/2012 4:35:44 PM)

Very nice, I have knocked together this macro http://world.episerver.com/Blogs/Lee-Crowe/Dates/2011/6/Language-File-Population-Helper-VS-Macro-v11/ that makes populating the language file much less of a mundane task for large global site builds. It would be useful if you could extend the extension to allow you to select text and easily add it to the language file.

Hampus Persson
(By Hampus Persson, 1/30/2012 4:55:44 PM)

Very cool !

dan.matthews
(By dan.matthews, 1/30/2012 5:31:00 PM)

Very neat!

Sergii.Vorushylo
(By Sergii.Vorushylo, 1/30/2012 5:42:51 PM)

@Croweman I have plans to add something like this in the future

steve
(By steve, 1/30/2012 10:37:00 PM)

Nice! Installed and works like a charm!

mathias.kunto
(By mathias.kunto, 2/4/2012 8:39:52 PM)

Cool! Good job, I like!

henskjold73
(By henskjold73, 2/17/2012 10:31:50 AM)

Very nice, will help a lot. Thanks.

Arild Henrichsen
(By Arild Henrichsen, 3/6/2012 4:48:52 PM)

This is really a sweet extension!

thomas
(By thomas, 8/24/2012 6:21:42 PM)

Will you also upgrade this extension for Visual Studio 2012?

Sergii.Vorushylo
(By Sergii.Vorushylo, 8/28/2012 12:26:47 AM)

@Thomas Yes, I have started working on the Visual Studio 2012 support.

Sergii.Vorushylo
(By Sergii.Vorushylo, 9/3/2012 12:21:15 AM)

The extension was updated for Visual Studio 2012

alexander
(By alexander, 10/26/2012 4:17:07 PM)

Like!

AndrewR
(By AndrewR, 5/7/2014 11:36:52 AM)

I have a new request / idea: The language doublesearch.
I quite often need to search like this:
Take some text from a user-provided screenshot, for example "Last ned:"
Search for this text to find the language key "/document/download".
Do a new search to find code that uses the language key.

I would like an extension that allows developers to enter a search text, and then get the language key, and a list of places where the key is used.
Any hopes for an extension upgrade to include this ?

But then maybe I'm the only one doing it this way.

Johan Book
(By Johan Book, 5/14/2015 2:39:36 AM)

Great tool! Need update for VS 2013

Please login to comment.