Multi-language control with combobox - c++

I'm trying to control language by selecting it in combobox, but I can't even write to the combo any selection as simple text.
Here is sourcecode: multilang

It is that what I'm looking for: Link

You can set the language automatically to the systemlanguage, due to creating a folder en-US (or every language tag you want) with a Resources.resw (Don't change it) in it.
To add Items to a ComboBox, open the "Collection" of the Items propperty of your ComboBox, select (at the bottom in the DropDown, next to "Add") "Other type..." and search for "String". Now you can add as many as you want, and edit their text on the right side.

Related

Add a new button to siebel list applet

I have a requirement to add a new button to a List Applet with the caption 'TEST'. I have added a new control to the specific list applet with HTML Type 'MiniButton' and Caption as 'TEST'. The button displayed as follows. what could be the reason for this and how to correct it?
Have you check the location where you added the button in the list applet? If you add the control to the specific control location like "new","query" they might appear odd. Check also the button's property "HTML Bitmap" - it should be empty.
As Pirkka mentioned, with post-IP17 Siebel the applet "edit weblayoyut" is only in WebTools and it doesn't work well. If you are using this version of Siebel, you might want to remove check the applet webtemplate item and ensure the SEQUENCE number assigned to it is correct. Just edit it in that list reference. My experience with the latest Siebel versions is that just adding the applet webtemplate item record directly is the best approach.
Check the underlying webtemplate that is used for your applet. Make sure that the sequence number assigned at the applet webtemplate item level for your control is actually corresponding to a control section in the underlying list applet webtemplate.
Is the applet and/or webtemplate custom? If it is OOTB, can you share the names?

Popup LOV item settings

Is it possible to disable Popup LOV item search bar and load by default all rows from SQL Query? Item has an JavaScript Initialization Code block, but I can find documentation how use it (for example like Rich Text Editor or Charts). For now I disabled Popup LOV search bar using CSS, but maybe there is another way?
There is no way to disable the search bar declaratively.
The CSS way is indeed your best bet.
Concerning the JavaScript Initialization Code attribute, the first thing I always do before putting anything in there is the following:
function(options){
console.log(options);
return options;
}
then checking the console. Usually you will see all of the declarative values and defaults for any other fancy things.
Your second option would be to check the actual source code, which usually includes some JSDoc. In the case of the Popup LOV, you want to look at this file. Of course the easiest way to get to these things is to put your app in debug mode, and navigate through the files in the Sources Panel.

Two column TPopupMenu to list shortcuts right aligned

Using Borland/CodeGear/Ebarcadero C++ Builder 2009. Is it possible to show shortcuts (or other text), right aligned in a second column in a TPopupMenu ?
For instance:
[image] Open File ctrl-O
[image] Close File ctrl-W
[image] BlahBlah ctrl-B
etc.
If so, how ?
I checked the break property on an item, but the results is not exactly what I want, since items are selectable on their own, instead of the complete line. Also it's not drawn that nicely.
Your feedback appreciated.
A menu item can have an image (see the TMenuItem.ImageIndex property), and can have a shortcut assigned (see the TMenuItem.ShortCut property). The VCL will automatically draw those elements for you, exactly as you have shown.
By default, they are a little squished together. You can use the TMenuItem.OnMeasureItem event to extend the Width:
If you still do not like the way the default drawing looks, or you want different text than the ShortCut to appear on the right side, you will have to owner-draw the menu items yourself (see the TMenuItem.OnDrawItem and TMenuItem.OnAdvancedDrawItem events), then you can make the menu items appear however you want.

How do I localize the names of menu items in Sitecore?

I'm creating localizations--in Spanish and Chinese--for a Sitecore site. The original language is English. I've learned how to create my language-specific versions of pages. But I don't know how to change the names of the the navigation items themselves. When I preview my pages in Spanish (http://content.example.com/?sc_lang=es), for example, the page content is in Spanish, but the navigation items themselves (e.g. Home, About, Products, etc.) are still in English. Where in the Content or Page editors do I fix that?
You need to modify the "display name" of the item in the Home ribbon. Be aware that this also affects the url of the item For the chosen language.
Edit: maybe I was too quick with my answer, I probably overread something cause my suggestion changes the Url (if you have the setting "useDisplayName=true" like jammykam corrected) and the name of the item in the content tree for the specific language.
If your the names displayed in the navigation is based on the Item names, then can do as I suggested, change the display item's name for the current language and make the code look at the display name inestead of the item name.
Another option is to use a separate field for the menu-title in case you want your titles to differ from your url's.
When you say the navigation items themselves are in still in English, what do you mean? As in, the menu running along the top of the page?
If so, then you need to figure out where in the content tree those items are and then add in the relevant language versions/translations, and make sure they are not "shared" content.
#Martijn, I believe it only affects the URL is you set "useDisplayName=true" in the linkManager setting in config.
We usually add a field called MenuTitle to the base content template and then instruct our navigation controls to read from that field
For menus, we generally use a different field for the page's title and the page's navigation title. This allows for a shorter version to be specified by the author for the menu.
Once you have that, you just need to make sure you build code in your header control to find the target item of the menu link (I assume it's a general link, or some other Item reference) and pull the target item's navigation title.
When the code does this, it should automatically pull the version of that target item based on the current language, which will mean you will get your navigation title in the correct language.

Adding buttons for HTML elements to the Sitecore rich text editor

I would like to add a button to the Sitecore rich text editor toolbar, specifically one that inserts the H2 element.
I know the H2 element can be inserted using the paragraph styles pulldown menu, but all my editors are now using the bold button for their headings because they don't "see" the paragraph styles pulldown. So, I want to make the H2 easily available using a toolbar button. (And maybe even removing the bold buttons, since it's not semantic at all.)
But no matter how I go through the documentation, I cannot find a good explanation on how to do this.
In addition to the guide Yan posted, here's another guide.
I found a couple of walkthroughs for this...
Sitecore v6.3 and previous: link
Sitecore v6.4: link
Make sure that you select the core database (bottom right of Sitecore desktop) so that you can see the /sitecore/system/Settings/Html Editor Profiles area.
In my article here the first step of wiring up an event to a button is in javascript. From there you can insert text or tags. You can also get the selected text and wrap it in tags. You don't need to compile anything I was just showing how you would if you needed to, but you can entirely cut that piece out and just use the editor to send whatever text you want back to the wysiwyg editor.