Microsoft office locale
Locale information types are described in Locale Information Constants. This locale is set when the operating system is installed or when the user selects it using the regional and language options portion of the Control Panel. When running a thread in a process belonging to the user, the operating system assigns the "user default locale" to the thread. An application can override either default by using the SetThreadLocale function to explicitly set the locale for a thread.
Implementation of a language requires a corresponding locale. The operating system implements a neutral language by selecting the data for the locale associated with a specific version of the language, usually the most widespread locale.
Starting with Windows Vista, it is possible for a particular language to correspond to a supplemental locale, which is a type of custom locale. Since supplemental locales all share a single locale identifier, your applications should handle these locales and the corresponding languages by name instead of by identifier. Language concepts are closely related to locale concepts, but the two terms are not interchangeable.
As a general rule, functions related to the Multilingual User Interface deal with languages, while the NLS functions act upon locales. About National Language Support. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related 6. Hot Network Questions.
Question feed. Super User works best with JavaScript enabled. You can then display date and time values in a format consistent with the current locale of the Office application. You can get the locale of the data of the Office client application by using the contentLanguage property. If you use Visual Studio to create Office Add-ins, the. NET Framework and Ajax provide ways to globalize and localize client script files.
You can globalize and use the Date and Number JavaScript type extensions and the JavaScript Date object in the JavaScript code for an Office Add-in to display values based on the locale settings on the current browser. You can include localized resource strings directly in standalone JavaScript files to provide client script files for different locales, which are set on the browser or provided by the user.
Create a separate script file for each supported locale. In each script file, include an object in JSON format that contains the resource strings for that locale. The localized values are applied when the script runs in the browser.
This section provides examples that show you how to localize an Office Add-in description, display name, and UI. To run the sample code provided, configure Office on your computer to use additional languages so that you can test your add-in by switching the language used for display in menus and commands, for editing and proofing, or both. You can use an Office Language pack to install an additional language. After you install the Language Accessory Pack, you can configure Office to use the installed language for display in the UI, for editing document content, or both.
The example in this article uses an installation of Office that has the Spanish Language Pack applied. Using the search box, enter add-in. Choose Word Web Add-in , then select Next. Visual Studio creates a solution and its two projects appear in Solution Explorer.
The Home. Add-in display name and description. This is controlled by entries in the add-in manifest file. Add-in UI. You can localize the strings that appear in your add-in UI by using JavaScript code, for example, by using a separate resource file that contains the localized strings. You can replace the Spanish language localized strings used in this example for the DisplayName and Description elements with the localized strings for any other language. When you change the display language for Office from English to Spanish, for example, and then run the add-in, the add-in display name and description are shown with localized text.
The following figure shows the heading h1 element and the paragraph p element that will display localized text when you complete the remaining steps and run the add-in. The JavaScript resource file contains the strings used for the add-in UI.
To enable localized strings for the heading and paragraph, you place the strings in a separate resource file. The resource file also provides a method for getting back the appropriate JSON object for a given locale. The UIStrings. To use the resource file in your add-in, you'll need to add a script tag for it on Home. When Home. If you want to change the localization for your add-in based on what language is used for display in menus and commands in the Office client application, you use the Office.
For example, if the application language uses Spanish for display in menus and commands, the Office. If you want to change the localization for your add-in based on what language is being used for editing document content, you use the Office.
For example, if the application language uses Spanish for editing document content, the Office. After you know the language the application is using, you can use UIStrings to get the set of localized strings that matches the application language. Replace the code in the Home. The code shows how you can change the strings used in the UI elements on Home. To test your localized add-in, change the language used for display or editing in the Office application and then run your add-in.
The following figure shows the Word Options dialog box opened to the Language tab. Under Choose Display Language , select the language that you want for display, for example Spanish, and then choose the up arrow to move the Spanish language to the first position in the list.
0コメント