Is it possible to get the actual language of the OS like on Windows Phone? I'm using CultureInfo.CurrentCulture.TwoLetterIsoString
, but I recieve always en and not the right language, which is de
in my case.
So how can I get the actual language in a WinRT app?
WinRT represents a new application execution environment with semantics that are very different than Win32. Unlike Win32, which was designed with C in mind, the WinRT APIs are written in C++ and designed from the beginning to be object oriented.
In linguistics, the projection principle is a stipulation proposed by Noam Chomsky as part of the phrase structure component of generative-transformational grammar. The projection principle is used in the derivation of phrases under the auspices of the principles and parameters theory.
WinRT allows developers to create safe "sandboxed" touchscreen applications available from the Microsoft Store. WinRT apps support both the x86 and ARM architectures and multiple programming languages, including C/C++, C#, Visual Basic and JavaScript. WinRT was augmented by the Universal Windows Platform (see UWP).
There are actually many "kind-of wrong" answers to this.
Windows.Globalization.Language.CurrentInputMethodLanguageTag
as pointed out by Thomas will not work in all the scenarios. It only returns the language in which user's keyboard is displayed. Windows.Globalization.ApplicationLanguages.Languages
but it is a combination of user language preference and applications supported languages.For most acurate user preference language, You'll need to use Windows.System.UserProfile.GlobalizationPreferences.Languages[0]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With