Language setting for a word document

Hello,

We would like to know that is it possible to change language setting for a word document as shown in the attached image to any other language.

e.g. We are using MS word with keyboard settings English language. If we create a document in say Chinese Language is it possible to get language setting for this document at the bottom as “Chinese Language”

Regards,
Dwarika

Hi Dwarika,

Thanks for your inquiry. Sure, you can set language. Please follow the link to learn how to achieve this:

Best regards.

Hello Alexey,

Thanks for your reply.

We implemented the way it is suggested in the link provided by you.

It is working for some of the languages.

Though it is not working for languages like Chinese <PRC / Taiwan>, Korean and Japanese.

Could you please suggest why this is happening?

Regards,

Dwarika

1 Like

Hello Dwarika,

Thank you for additional information. I cannot reproduce the problem on my side using the latest version of Aspose.Words (9.1.0). You can download this version from here:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

I use the following code for testing:

Document doc = new Document("in.doc");
//Create a run of text that contains Russian text.
Run run = new Run(doc, "Test");
//Specify the locale so Microsoft Word recognizes this text as Russian.
//For the list of locale identifiers see http://www.microsoft.com/globaldev/reference/lcid-all.mspx
run.Font.LocaleId = 1028;
doc.FirstSection.Body.LastParagraph.AppendChild(run);
doc.Save("out.doc");

Best regards,

Hello

Also you can try setting Font.LocaleIdBi property for right-to-left characters:

Or Font.LocaleIdFarEast property for Asian characters:

Best regards,

Hi,

As I have already mentioned that for us the setting language name is not happening for languages like Chinese (PRC), Korean and Japanese.

Take a look at locale ids used for Chinese (PRC) and Korean through code. Do let us know in case we are doing something wrong.

Just for your information, same method is called for rest of the languages like English, Arabic, Finnish and report language setting is displayed properly at the bottom of the entire report for any paragraph, small text or label text.

Do let us know what can be done further to sort out this problem related to Chinese (PRC) and Korean language.

Regards,Dwarika

Hi Dwarika,

Thanks for your request. Have you tried specifying LocaleIdFarEast as Andrey already suggested? This should properly work. If not, please provide sample code to reproduce the problem.

Best regards,

Do you mean LocaleIdFarEast will work for languages Chinese, Korean and Japanese?

Please confirm.

Regards, Dwarika

Hi Dwarika,

Thanks for your inquiry. Yes, I mean that LocaleIdFarEast will work for Eastern languages, like Chinese, Korean and Japanese.

Best regards,

Thanks for your suggestion.

I tried using following setting instead of just setting localeId

// documentBuilder.Font.LocaleId = localeId;// - Old setting
documentBuilder.Font.LocaleIdFarEast = localeId;// - new setting as per suggestion.
  1. Our application is working as expected by setting LocaleId for all languages except Asian languages like Chinese, Korean etc

  2. After setting LacaleIdFarEast the setting for report language stopped working even for Arabic, Polish, and Finnish etc. So after using LocaleIdFarEast, what was working for us in case 1 stopped working?

Do let us know is there any other workaround to get this resolved.

Regards, Dwarika

Hi Dwarika,

Thank you for additional information. As I mentioned LocaleIdFarEast will work for Eastern languages, like Chinese, Korean and Japanese.

As Andrey already mentioned there are three property for setting localeId: LocaleId, LocaleIdBi and LocaleIdFarEast. So depending on language, you need to use one of them. If you use European languages, like English, German etc, you should use LocaleId. If you use Arabic languages you should use LocaleIdBi. And if you use Eastern languages you should use LocaleIdFarEast.

Please see the documentation for more information:

Best regards,

Hello,

Thanks for detailed information.

In our application setting LocaleId and LocaleIdBi is working as required.

Though LocaleIdFarEast is still a problem. Even after setting LacaleIdFarEast, report language displayes English instead of the language used like Korean, Chinese etc.

Any idea why one property is not working while there is no problem for rest 2.

Regards,

Dwarika

Hi Dwarika,

Thank you for additional information. I managed to reproduce the problem. For some reason LocaleIdFarEast option does not work for DOC format (However works fine for DOCX). Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

Hello Alexey,

Thank you for your reply. Can you please let me know by when can I get the fix for this?

Regards,
Dwarika

Hi Dwarika,

Thanks for your request. Unfortunately, I cannot provide you any reliable estimate regarding this issue at the moment. We will let you know once the problem is resolved. My apologizes for inconvenience.

Best regards,

The issues you have found earlier (filed as 20708) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.