Win32 API获取操作系统的语言(本地化信息)? [英] Win32 API for getting the language(localization info) of the OS?

查看:335
本文介绍了Win32 API获取操作系统的语言(本地化信息)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都请帮助我如何通过win32 API(C / C ++)获得Windows操作系统的语言(英语,中文等)?




Sourabh

解决方案

你可以得到默认的用户区域设置a href =http://msdn.microsoft.com/en-us/library/dd318135%28VS.85%29.aspx> GetUserDefaultLCID 。这将给你一个ID,可以用来确定文化。请参阅此处查找包含ID及其所代表的文化格式的表格。



对于Vista或Windows 7,Microsoft建议使用 GetUserDefaultLocaleName 。 p>

Can anybody please help me with how to get the language(english,chinese etc) of Windows OS through win32 API(C/C++)??

Thanks, Sourabh

解决方案

You can get the default user locale (which I think is what you're asking) using GetUserDefaultLCID. This will give you an ID which can be used to determine the culture. See here for a table containing IDs and the cultures they represent.

For Vista or Windows 7, Microsoft recommend GetUserDefaultLocaleName.

这篇关于Win32 API获取操作系统的语言(本地化信息)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆