using System.Windows;
using Microsoft.Phone.Controls;
using System.Globalization;
using System.Threading;

namespace WPLocalization1
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void btnGerman_Click(object sender, RoutedEventArgs e)
        {
            CultureInfo ci = new CultureInfo("de-DE");
            Thread.CurrentThread.CurrentCulture = ci;
            Thread.CurrentThread.CurrentUICulture = ci;
            PageTitle.Text = StringResources.HelloWorldText;
        }

        private void btnEnglish_Click(object sender, RoutedEventArgs e)
        {
            CultureInfo ci = new CultureInfo("en-US");
            Thread.CurrentThread.CurrentCulture = ci;
            Thread.CurrentThread.CurrentUICulture = ci;
            PageTitle.Text = StringResources.HelloWorldText;

        }
    }
}