0

The Quick Acces Toolbar has a popup menu with three options

  • More Commands
  • Show Above the Ribbon
  • Minimize the Ribbon

I need these options appear in Spanish

Sir Rufo
  • 18,395
  • 2
  • 39
  • 73
jmontegrosso
  • 89
  • 1
  • 11

1 Answers1

2

The constants used for those menu items (along with all the other ribbon-based string constants) are located in RibbonConsts.pas. They're at the top of the file, in a section headed up with the comment

  // Quick Access Toolbar

To change them, copy the file to your project directory, and make the changes to that local copy. Then build (not compile, but Project->Build from the main menu). The changed constants will not appear at design time, but they will be used at runtime in your application. (See the note below for an alternative that does not require modifying the source, but doing it at runtime instead.)

Do note that if you use runtime packages, the above changes will not have an effect, as they won't change the constants contained in the VCLRibbon package. You can remedy this by removing the ribbon packages from the list of runtime packages so that the ribbon code will be linked into your executable instead.

Alternative method (provided courtesy of Uli Gerhardt in a comment below): You can modify the resource strings at runtime via code instead, using VirtualProtect. An example of doing so can be found in Ok to Use VirtualProtect to change resource in Delphi?. You would simply change the resource names from that example to the names of those used in RibbonConsts that you want to change (and of course add RibbonConsts to your implementation uses clause so the names are available).

(I found these constants by opening a command prompt in the Source\VCL folder and doing a find /I "More Commands" *ribbon*.pas. It was fairly quick, and it's a pretty useful technique, as is using the Search->Find in Files menu option from the IDE's main menu.)

Community
  • 1
  • 1
Ken White
  • 123,280
  • 14
  • 225
  • 444
  • The strings are `resourcestring`s, so you can change them without fiddling with the VCL sources - e.g. via [HookResourceString](http://stackoverflow.com/questions/2229699/ok-to-use-virtualprotect-to-change-resource-in-delphi). – Uli Gerhardt May 16 '14 at 06:24
  • @Uli: Thanks for that - I'd missed that previous question. Do you mind if I add that information to my answer (with credit to you for pointing it out) so it can be more easily seen by future readers? – Ken White May 16 '14 at 18:49