• 大小: 0.09M
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: wpf  转换  语言  翻译  

资源简介

wpf界面语言转换翻译,实现多国语言的界面切换,包含八种语言转换功能,一个版本容纳多种语言,这就意味着不要创建单独的英语版本、法语版本、日语版本等等。 许多电子产品(例如电视和数码相机)在同一模块中支持多语言。你不需要购买不同模块或给软件打补丁来得到与默认设置不同的语言。

资源截图

代码片段和文件信息

using System.Windows;
using System.Globalization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;

namespace LocalizationDemo
{
    /// 
    /// App.xaml 的交互逻辑
    /// 

    public partial class App : Application
    {
        public static string Culture { get; set; }

        protected override void onstartup(StartupEventArgs e)
        {
            base.onstartup(e);

            GetCulture();
        }
        private void Application_Exit(object sender ExitEventArgs e)
        {
            SetCulture();

//MessageBoxManager.Unregister();
        }

        #region Method
        private void GetCulture()
        {
            Culture = string.Empty;
            try
            {
     

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        821  2014-08-19 12:05  CRWPFYuYanSwitch\LocalizationDemo\app.config

     文件        662  2014-08-21 17:42  CRWPFYuYanSwitch\LocalizationDemo\App.xaml

     文件       2882  2014-08-21 17:41  CRWPFYuYanSwitch\LocalizationDemo\App.xaml.cs

     文件      19968  2014-10-09 18:50  CRWPFYuYanSwitch\LocalizationDemo\bin\Debug\LocalizationDemo.exe

     文件        821  2014-08-19 12:05  CRWPFYuYanSwitch\LocalizationDemo\bin\Debug\LocalizationDemo.exe.config

     文件      38400  2014-10-09 18:50  CRWPFYuYanSwitch\LocalizationDemo\bin\Debug\LocalizationDemo.pdb

     文件      11600  2014-10-09 18:48  CRWPFYuYanSwitch\LocalizationDemo\bin\Debug\LocalizationDemo.vshost.exe

     文件        821  2014-08-19 12:05  CRWPFYuYanSwitch\LocalizationDemo\bin\Debug\LocalizationDemo.vshost.exe.config

     文件        490  2012-06-02 22:34  CRWPFYuYanSwitch\LocalizationDemo\bin\Debug\LocalizationDemo.vshost.exe.manifest

     文件       4648  2014-08-25 10:01  CRWPFYuYanSwitch\LocalizationDemo\LocalizationDemo.csproj

     文件        227  2012-04-17 21:46  CRWPFYuYanSwitch\LocalizationDemo\LocalizationDemo.csproj.user

     文件       3289  2012-04-19 22:10  CRWPFYuYanSwitch\LocalizationDemo\MainWindow.xaml

     文件       2348  2014-10-09 18:48  CRWPFYuYanSwitch\LocalizationDemo\MainWindow.xaml.cs

     文件        833  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\App.baml

     文件       3024  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\App.g.cs

     文件       3024  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\App.g.i.cs

     文件      11887  2014-10-09 18:51  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6790  2014-10-09 18:50  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件      19447  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo.csproj.FileListAbsolute.txt

     文件        917  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo.csproj.GenerateResource.Cache

     文件      19968  2014-10-09 18:50  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo.exe

     文件       7241  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo.g.resources

     文件      38400  2014-10-09 18:50  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo.pdb

     文件        180  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo.Properties.Resources.resources

     文件        547  2012-04-19 23:55  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo_Content.g.i.cs

     文件        492  2014-10-09 18:50  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo_MarkupCompile.cache

     文件        491  2014-10-09 18:10  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\LocalizationDemo_MarkupCompile.i.cache

     文件       3091  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\MainWindow.baml

     文件       6311  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\MainWindow.g.cs

     文件       6311  2014-10-09 18:49  CRWPFYuYanSwitch\LocalizationDemo\obj\x86\Debug\MainWindow.g.i.cs

............此处省略50个文件信息

评论

共有 条评论