Converts a locale name to a locale identifier.
With Microsoft Teams you can chat, meet, call, and collaborate from anywhere for free. Express yourself powerfully with a thin, light, and elegant design, faster performance and up to 11.5 hours battery life. Get expert tips on how to use Microsoft Teams – free to educators and students – to. Dec 04, 2018 I updated to Microsoft Word v 16.19 (181109) for Mac (v 10.14.1) and now pretty much every time I do - Answered by a verified Microsoft Office Technician. Jul 31, 2014 I have been unsuccessful at getting Lync to work on my admin profile on my Mac. It does, however, work on my co-workers admin profile. Lync for Mac, use on multiple profiles. By michael.kracke. On Feb 28, 2014 at 18:27 UTC. Microsoft Office. Next: Outlook 2010 Creating a hyperlink by drag and drop. Get answers from. Application LCID: 1033.
lpName
Pointer to a null-terminated string representing a locale name, or one of the following predefined values.
dwFlags
Prior to Windows 7:Reserved; should always be 0.
Beginning in Windows 7: Can be set to LOCALE_ALLOW_NEUTRAL_NAMES to allow the return of a neutral LCID.
Returns the locale identifier corresponding to the locale name if successful. If the supplied locale name corresponds to a custom locale that is the user default, this function returns LOCALE_CUSTOM_DEFAULT. If the locale name corresponds to a custom locale that is not the user default, the function returns LOCALE_CUSTOM_UNSPECIFIED.
If the locale provided is a transient locale or a CLDR (Unicode Common Locale Data Repository) locale, then the LCID returned is 0x1000.
The function returns 0 if it does not succeed. To get extended error information, the application can call GetLastError, which can return one of the following error codes:
Beginning in Windows 8: If your app passes language tags to this function from the Windows.Globalization namespace, it must first convert the tags by calling ResolveLocaleName.
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | winnls.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |
Learn how to display and publish custom Microsoft Lync 2013 presence in an application by using Microsoft Lync 2013 SDK.
Applies to: Lync 2013 | Lync Server 2013
The prerequisites for displaying and publishing custom availability are as follows:
An administrator must configure custom presence states on the Microsoft Lync Server 2013 computer that a user signs in to from your application. For more information, see Configuring Custom Presence States.
The Microsoft Lync 2013 client must be signed in.
Figure 1 shows a sample application window that lets a user see current presence and custom presence activity. The list on the right side shows the possible custom presence states and the Publish button publishes the custom presence selected by a user.
Figure 1. Custom user activity window
The current localized presence state is the last state that was published by a contact.
Tip |
---|
The logic in this procedure is used for any Microsoft.Lync.Model.Contact object. The contact can be the signed-in user Self contact, any contact in the user’s contact list, or any contact found by a contact search. |
To get the current state, call the Contact.GetContactInformation method on the Microsoft.Lync.Model.Contact object value of the Self.Contact property, passing the ContactInformationType.CustomActivity enumerator.
A list of Microsoft.Lync.Model.LocaleString objects is returned as system.object.
Iterate on the list of objects, casting each object to type Microsoft.Lync.Model.LocaleString.
Inside of the foreach loop, compare the LocaleString.LocaleId property value to the current UI culture LCID. If they match, display the LocaleString.Value property as the current custom activity in the user’s language.
Important |
---|
If activity strings have not been localized for a particular culture, you should define a default locale ID value to display. For example, in North America, locale ID 1033 is frequently used. If the signed-in user has selected 1036 (French, France) as the UI culture, but no localized strings have been configured on the server for 1036, you would display strings for 1033. |
The following example compares the LCID of the current culture to the LCID of a custom presence activity. If they match, the custom presence activity is displayed. If no match is found, the LocaleString collection is search for a default LCID. The CultureInfo.DefaultThreadCurrentUICulture property is available in the .NET Framework 4.5.
The following example iterates on the custom presence objects and casts the objects to LocaleString.
You can only publish custom presence states that have been configured on the Microsoft Lync Server 2013 computer on which a user is signed in. Before publishing one of these custom presence states, query for the available states and then publish the ID of the desired state.
A Lync Server 2013 computer can be configured to have custom presence states in multiple languages. When you query for the collection of custom presence states, you specify a culture LCID. Only custom presence states that belong to the specified culture are returned.
Get the current UI culture.
The following example gets the current culture.
Get the collection of publishable presence stated for the specified culture.
Get the custom presence state ID and activity string for each custom presence state in the collection.
Declare a Dictionary<PublishableContactInformationType, object> to hold the information type and value to be published.
Add an item to the dictionary where the key is PublishableContactInformationType.CustomActivityId and the value is the ID of the custom presence state to be published.
Publish the custom presence state by calling the Self.BeginPublishContactInformation method.
The following example publishes the selected custom presence. If an invalid custom presence ID is used, the Microsoft.Lync.Model.ItemNotFoundException is raised.
The following code declares the window show in figure 1.
The following example declares interaction logic for MainWindow.xaml.
The following example is an XML file that declares a set of custom presence states for multiple UI culture LCID values. This XML file must be available for all Lync clients to access.