Babylon.NET - translating software made easy

A friend of mine (and former boss… oh yeah, quite some time ago), Martin Geier, wrote a nice application that allows you to translate .NET resources from one language to another. The program is called Babylon.NET and has been released at redpin.eu.

The application targets one specific problem: translation of applications. I don’t know how often you had to do that but I’m from a region where a lot of people speak German and Italian. We, therefore, know both languages and have the benefit of publishing software for both languages. But translating software (even that it has gotten better with the advent of Visual Studio .NET, 2005, 2008) is still a very tedious and error-prone task.



Babylon.NET focuses on .NET projects created in Visual Studio. It offers features that are tailored to support developers or translators during their tasks while translating projects hat have been created in Visual Studio and are managed with Visual Studio. Some of these features are:

  • Directly reads Visual Studio project files to start a new translation project.
  • Synchronizes changes in the Visual Studio project with the translation project at any time.
  • Writes localized resource strings directly to the Visual Studio resource files.
  • Keeps track of the translation status for every single resource string in every locale.
  • Supports the reviewing process of the localization by keeping track of the quality status for every single recource string in every locale.
  • Automatic verifier checks for common problems during localization such as inconsistent translations, string.Format placeholder errors or punctuation errors.
  • Separate, restricted “Translator” editition can be given to every translator working on the project.
  • Offers a modern, simple and intuitive user interface tailored to the localization process.

These are only some of the interesting features in Babylon.NET that you might find interesting when translating a piece of software. For more information please visit the website at redpin.eu. They have also a trial version for download. :)

Published on Aug 31st, 2008 — Tags: , , , ,
Comments (1)    digg it!    kick it   

Implementing the IDisposable interface

First it seems that the IDisposable interface is really easy to implement. It has only one method and how hard could it be to implement one method?! Soon after the first random exceptions happen you might realize that the IDisposable interface is a tough one.

There are a few things that should be considered when implementing the destruction process of a .NET class:

  1. Make sure you have a destructor in the class: to ensure that unmanaged resources get cleaned up.
  2. Try to follow a pattern that you can easily apply to all the various classes that need disposal.
  3. Try to follow the guidelines for the .NET IDisposable interface.

Looking at the samples you will see that Microsoft usually implements a method that can be called form both, the destructor and the IDisposable’s Dispose method. I usually follow that and create a second (and private; could also be protected) Dispose method that takes an argument saying it was called from the destructor or the IDisposable’s Dispose.

In that overloaded Dispose method I make sure that during a call from the destructor no managed class gets touched at all. That’s important because during garbage collection managed class instances get destroyed in a random order. It’s not guaranteed that any of the managed instances that you hold inside your class (as class fields) is still alive during a destructor call. This is one of the most important things to keep in mind when implementing the IDisposable interface.

I pointed out “managed classes” because pointers to native code are still alive (the GC ignores them). You need to manually clean them up inside of the overloaded Dispose method.

My code snippet for an implementation looks like this:

public sealed class Foo : IDisposable
{
    // this field is true when the class has been disposed.
    private bool _disposed;

    /// <summary>
    /// Destructor of the Foo Class.
    /// </summary>
    ~Foo()
    {
        // call the dispose method with false since
        // the garbage collector is destroying the
        // instance.
        Dispose(false);
    }

    /// <summary>
    /// Disposes the current instance of the class.
    /// </summary>
    /// <param name="disposing">True when this method is
    /// called form the dispose method of IDisposable.</param>
    private void Dispose(bool disposing)
    {
        // return if this instance is already disposed.
        if (_disposed)
            return;

        if (disposing)
        {
            // it is save to access member variables (class fields)
            // inside of this block. This block is only entered
            // when the Dispose method of IDisposable is invoked.
            // you should dispose (call the Dispose method) of
            // member variables (class fields) inside of this block.
        }

        // outside of the "disposing" block it is only save to
        // release native (unmanaged) resources. If you have
        // class fields holding a pointer to a native piece
        // of memory you can safely free that.

        // it is not save to access other managed classes from
        // here. They might have been destroyed by the garbage
        // collector already! There is no way to force the GC
        // to destroy objects in a certain order.

        _disposed = true;
    }

    #region IDisposable Members

    /// <summary>
    /// Disposes the current instance of the class.
    /// </summary>
    public void Dispose()
    {
        // call the dispose method with true, since
        // we are inside the Dispose method of IDisposable.
        Dispose(true);

        // make sure the GC is not going to call the destructor
        // of this class again. This saves time during garbage
        // collection.
        GC.SuppressFinalize(this);
    }

    #endregion
}

Published on Aug 24th, 2008 — Tags: , ,
Comments (9)    digg it!    kick it   

Synchronizing Data: Inside the Microsoft Sync Framework

A few days ago Charles Torre from Channel 9 shot an awesome interview with a few members (Aaron Greene, Andrei Maksimenka and me) of the Microsoft Sync Framework team. In the video we explain how to get started with the Sync Framework, what the goals of the Sync Framework are and how we are committed to the native and the managed world:

If you have any comments feel free to post them here or go over to the website where the video was published to leave a comment.

Published on Aug 22nd, 2008 — Tags: ,
Comments (1)    digg it!    kick it   

So this is what happens at Microsoft…

Yesterday I posted my blog post about Erik not being in his office. And today we had lunch. :)

What did happen? It seems as if Erik came somehow to notice about my post and found it interesting. In the evening he wrote me an email where he said that I’m going to be more lucky if I walk by today at 11:30am. I did that and we (him, a few members of his team and I) went out for lunch.

It was cool because I had the chance to speak with the person behind Volta, LINQ and many other interesting projects. His team is also very cool and we had fun discussing some of the stuff that goes on inside and outside of Microsoft.

It’s nice to meet the people behind the technologies at Microsoft. I love it :-)

Published on Aug 21st, 2008 — Tags:
Comments (0)    digg it!    kick it   

I walked down…

… but Erik Meijer wasn’t there. He is probably out. I will try again in a few days. :)

Published on Aug 20th, 2008 — Tags: ,
Comments (2)    digg it!    kick it   

My way to work at Microsoft

A few days ago I had the idea of making a photo series of my way to work. The following are the pictures that I took:

Looking back to the appartment
Looking back to the appartment.

That's where the cars park
That’s where the cars park in front of my appartment.

Heading direction street
Heading direction main street.

Heading direction street
Looking down to the main street that I need to cross.

If you are interested in the full series of me walking to my office you can download it from here.

Published on Aug 19th, 2008 — Tags: , ,
Comments (4)    digg it!    kick it   

Co-host on “This week on Channel 9″

I couldn’t post this because for technical reasons my blog was down over the whole weekend.

I have been a co-host of Dan Fernandez of this week’s episode of “This week on Channel 9″. It is a show that airs each week and shows what happened in the geek world in the last week. Shooting the show was a big fun because Dan is really enjoying what he does and made a lot of jokes…

It would be cool if they invited me again for another episode. Let’s hope that is going to happen :)

Published on Aug 18th, 2008 — Tags:
Comments (0)    digg it!    kick it   

Flying to Seattle

I took tons of pictures while flying from Innsbruck to Frankfurst and from Frankfurt to Seattle. We crossed the north sea, Greenland, Canada, the Rocky Moutains and finally landed in Seattle. Flying over Greenland was really really awesome. I have never seen so much ice and rocks. The swimming icebergs are only impressive. Canada is also really cool because it looks really empty until you see some big straight streets that cross the whole country… that’s when you understand that people life there.

The best pictures that I took are the following:

DSC00617

DSC00619

DSC00634

DSC00659

DSC00681

DSC00678

DSC00700

DSC00713

DSC00723

The full series of photos is found here.

Published on Aug 17th, 2008 — Tags: , , , , ,
Comments (0)    digg it!    kick it