示例#1
0
        /// <summary>
        /// Handles the locale of the application on startup
        /// </summary>
        /// <returns>Locale from settings if available, otherwise system default locale</returns>
        private string HandleStartupLocale()
        {
            string locale = MediaExtractor.Properties.Settings.Default.Locale;

            if (string.IsNullOrEmpty(locale))
            {
                locale = I18n.GetSystemLocale();
            }

            Thread.CurrentThread.CurrentUICulture = new CultureInfo(locale);
            return(locale);
        }
 /// <summary>
 /// Enables the system locale as application language
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void SystemLocaleMenuItem_Click(object sender, RoutedEventArgs e)
 {
     ChangeLocale(I18n.GetSystemLocale());
 }