VBA Cannot set RightToLeft even with Excel Language set to Arabic - excel

I have a problem with my Excel (Office 365, Windows 10) VBA Project. I am attempting to create a GETTEXT equivalent, allowing authors to internationalize and therefore provide localisations for their own projects. I am trying to replicate the view that somebody using Excel would see if using an RTL language such as Arabic.
I have downloaded, and installed the Arabic language pack. I have made it my preferred language and it opens up as default with my Office apps (BTW - I Don't understand Arabic, I could have as easily downloaded any other RTL language).
I have selected an Arabic font from Tools > Options > Editor Format > Font: Normal Text = "Dubai Medium (Arabic)"
Unfortunately, I am not able to display Arabic text directly in Control Properties window, e.g. Form caption or Textbox text; nor am I able to type or paste Arabic text into the Editor window. I get the dreaded ????.
Built-in Excel Message boxes and commands appear in Arabic and as RTL, but my message boxes and forms can't be set. The only workaround I've found so far is to place the Arabic text in a worksheet cell and call it from there or to paste the text directly into the form control. Also MsgBox allows RTL and Right-Align Text constants, which is fine, but this leaves my Forms all messed up, even if I programmatically change the .Left and .TextAlign values of controls, I still have the issue of left-aligned Form caption, right-aligned close button, and various issues with MultiPage and TabStrip alignment.
I can't believe Microsoft would be so awkward, so I must be missing something. I'm loathe to install Arabic as my Windows language just to test things, as that would really mess up my day - I'd be totally lost - no offence to Arabic users!
Any help would be much appreciated.

Ok, I finally got it to work (sort of). I had to set the System Locale to Arabic. This can be done by the following:
Settings > Time and Language > Language > Administrative Language Settings (link)
Then on the ensuing dialog...
Under the Language for non-Unicode programs, press the Change System Locale button and choose one of the Arabic options.
The only issue is that the Form caption is not right-aligned and the control box (close) is still on the right. But I guess that's small potatoes. All controls with a scrollbar / button (RefEdit, ListBox, ComboBox etc) now have the correct RTL positions. Tabstrips, Frames and MultiPages are also correctly RTL'd. I hope this helps anybody else puzzling over this issue.

Related

non-English characters displayed incorrectly until CommandButton is clicked

I have excel file with some ActiveX CommandButtons integrated directly into worksheet. Their Captions written in non-English language with some non-English characters. Problem I encountered that some of these characters are not displayed correctly until CommandButton is clicked (picture below):
Have anybody encountered similar problem? I tried changing fonts and character size, but that did not helped.
I cannot provide any code since I have no idea where to start. Maybe it is possible to somehow fake constant focus to them?
Laba diena!
If you created these with ActiveX Command buttons, you should be able to view the name and caption properties by either 1) clicking once, then right-clicking to get a menu with properties as a choice or 2) double-clicking to get a click event started in the visual basic editor. From there you should see what's listed as the caption for the button.
In the button properties there should be a "TakeFocusOnClick" property that defaults to True. I don't know if it will fix your problem, but try changing it to false. I couldn't emulate your exact problem, so I couldn't tell.
sėkmės!

CEdit in CDialog not working in Japanese and chinese language

I have a unicode MFC Dialog application which has CEdit control. When i change the system language to Japanese/Chinese and enter Japanese or Chinese characters, I don't get EN_CHANGE or EN_UPDATE notification. The text goes to multiple lines. I get EN_CHANGE or EN_UPDATE if I do a ENTER from keyboard and text gets wrapped in a single line. I tried changing fonts from Dialogue resource; but still no luck.
Have you come across these kind of issues? Any clue or lead will be appreciated.
-Sukhas

How to save text direction default in web sites?

I wonder if there a way to save text direction default- right to left (RTL) or vise versa (left to right-LTR) in different web pages. So when i open specific web site the text direction will be automatically LTR or RTL. I use google chrome so i tried to search in the properties and didn't find any option to save text direction default. I red change text direction of textbox automatically and How can I automatically set text direction based on input text language? and other questions and search in my windows xp Language preference but didn't find what i'm looking for.
Thanks in advance for any help.
UPDATE:
I'm using a program called "Lang Over 5" that changed text orientation using "F10" button. But i can't save default text orientation in web sites with it.
It likely cannot be done for different webpages/sites unless someone has created an add-on module that I'm unaware of. Here are two options that you can do, however:
1) Use two different browsers, set each to the proper language settings that you want.
2) If you are set on using Chrome for both, you may be able to run multiple instances as is shown here: http://blog.buddywork.com/post/15839021578/how-to-run-multiple-instances-of-chrome

Changing font of text inside an extension library dialog box?

How do you change the text within the extension library dialog box? No matter what I do, the text remains the same size. I can see the font change in the designer cleint but not in the browser. I tried looking at it with IE Developer Tools but I can't even see the text anywhere.
I have no idea what was going on yesterday but it just wasn't working. I was simply trying to set the text size of a computed field inside a dialog box. I changed the font size in the properties of the computed field and seems to work now, We have seen these issues on our dev server before.
I am not sure if you can change the text with text options but you can if you use HTML, and it should also work with CSS.
Standard <h1><h2><h... oh you get the idea works for me.

Xpages rich text field full alignment

In the rich text field I choose Full alignment, but when previewed the text has left alignment. When I close and reopen the document, the text is brought back to left alignment.
How can this be resolved?
If I understand you correctly, you have a Notes Form with a Rich Text field, in which you align the text "justified", as in the screenshot below:
But if you view that in a Xpage, the text is no longer justified, neither in the read-only rendering, nor in the edit-rendering with the CKEditor:
Alas, if you align the text justified via the CKEditor, it renders properly in the browser
with an "interesting" rendering in the Notes Client:
This is a "known" problem and in my demo case, the Xpages runtime engine even warns me about that:
"Saving this document will change its format from native Notes rich text to HTML. This may cause a change or loss of formatting if opened again in the regular Notes client."
The conversion of rich text to HTML and vice versa is not the whole problem, even though the message says that. There are also issues with repeated conversions back and forth changeing font sizes, loss of certain colors and styles, etc.
This is a long standing issue with Ben Langhinrichs, who documents that rather thoroughly and even sells an extension to handle that conversions better.
Hope this helps a little bit.
I am using v8.5.3 and in the All Properties of the CKeditor they have a property called 'htmlConversion Warning' that you can set to 'noWarning' which seems to prevent the Saving this document message mentioned above. Seems someone from IBM has taken a note from Microsoft on providing a solution. Now if only they would take a note from them on how to market the product.

Resources