Pages

Tuesday, May 24, 2016

A Simple Language Selector in Episerver

On my current Episerver project, we had a need to support a couple languages for the website, and display them via a simple nav-like language selector at the top. Being fairly new to Episerver, I started looking into how I needed to build it out and what was involved. I found a bunch of information on Localization and Globalization, and it helped point me in the right direction, but there were some minor differences I found due to the age of the articles. Episerver has been updating pretty actively since version 7, so some of the information wasn't up to date.

After putting together my solution, I wanted to share it and point out a few things I encountered along the way. This post is my attempt at adding some updated information while working with Episerver 9.x and how I built our language selector.

Friday, May 20, 2016

Moving your changes to a new branch in Git with Visual Studio

I am pretty sure this scenario happens to everyone a couple times during a development cycle, if they are working with source control and branching. You make changes, you commit those changes, you merge those changes to a different branch. You make more changes, you go to commit those changes, you realize you are still on that different branch. Now what?

In Visual Studio you cannot simply switch branches with changes that need to be committed. Because of the way Git manages the commit history, it could break or lose changes if this happened. Instead, you are presented with a lovely message:

Thankfully, there is a pretty simple approach that seems to work well for just this case: Stashing.