Locales for output document

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Editor MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-editor -- dnx GroupDocs.Editor.Mcp --yes
Folders, licensing and more →

WordProcessingSaveOptions class contains 3 very similar properties of the same type System.Globalization.CultureInfo:

public System.Globalization.CultureInfo Locale { get; set; }
public System.Globalization.CultureInfo LocaleBi { get; set; }
public System.Globalization.CultureInfo LocaleFarEast { get; set; }

In most cases the output WordProcessing document, which is generated from the EditableDocument instance by the `editor.Save() method, contains valid locales for the textual content. But in some cases it is necessary to forcibly and explicitly set a some specific locale for the output document. These three options provide such possibility. However keep in mind that they are suitable only when document should have some single locale. If document is multi-language and contains, for example, English and Spanish text, setting the locale to English (“en-GB”, for example) will mark the Spanish text as English too, so spell checking in MS Word, for example, will not work properly for such text.

By default all these three locale-related properties are not specified, their values are NULL. In such case MS Word (or other program) will detect (or choose) the document locale according to its own settings or other factors. Additionally, if document is multi-language, it is strongly encouraged to enable the EnableLanguageInformation property in the WordProcessingEditOptions class while editing original document, and not to use these 3 properties.

The Locale property is intended to set the locale for usual left-to-right text, which consists of letters.
The LocaleBi property should be used when text is right-to-left (RTL), for example, Arabic script or Hebrew alphabet.
The LocaleFarEast property should be used for East-Asian (Far-East) text, including CJK characters.