Index: /CKEditor/branches/prototype/_source/dialogs/testOnly/dialog.js
===================================================================
--- /CKEditor/branches/prototype/_source/dialogs/testOnly/dialog.js	(revision 2651)
+++ /CKEditor/branches/prototype/_source/dialogs/testOnly/dialog.js	(revision 2652)
@@ -4,4 +4,8 @@
 				title : 'Test Dialog',
 				resizable : CKEDITOR.DIALOG_RESIZE_BOTH,
+				buttons : [ 
+					CKEDITOR.dialog.okButton.override( { label : 'Apply' } ),
+					CKEDITOR.dialog.cancelButton.override( { label : 'Close' } )
+					],
 				minWidth : 500,
 				minHeight : 400,
Index: /CKEditor/branches/prototype/_source/lang/en.js
===================================================================
--- /CKEditor/branches/prototype/_source/lang/en.js	(revision 2651)
+++ /CKEditor/branches/prototype/_source/lang/en.js	(revision 2652)
@@ -51,4 +51,6 @@
 	selectAll		: 'Select All',
 	removeFormat	: 'Remove Format',
+	ok				: 'OK',
+	cancel			: 'Cancel',
 	horizontalrule	: "Insert Horizontal Line",
 
Index: /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2651)
+++ /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2652)
@@ -707,4 +707,13 @@
 	},
 
+	/**
+	 * Gets the editor instance which opened this dialog.
+	 * @returns {CKEDITOR.editor} Parent editor instances.
+	 */
+	getParentEditor : function()
+	{
+		return this._.editor;
+	},
+
 	saveSelection : function()
 	{
@@ -751,19 +760,32 @@
 		 * @field
 		 * @example
-		 * @type CKEDITOR.ui.dialog.button
+		 * @type Function
 		 */
-		okButton : 
-		{
-			id : 'ok',
-			type : 'button',
-			label : 'OK',
-			style : 'width: 60px',
-			onClick : function( evt )
-			{
-				var dialog = evt.data.dialog;
-				if ( dialog.fire( 'ok', { hide : true } ).hide !== false )
-					dialog.hide();
-			}
-		},
+		okButton : (function()
+		{
+			var retval = function( editor, override )
+			{
+				override = override || {};
+				return CKEDITOR.tools.extend( {
+					id : 'ok',
+					type : 'button',
+					label : editor.lang.ok,
+					style : 'width: 60px',
+					onClick : function( evt )
+					{
+						var dialog = evt.data.dialog;
+						if ( dialog.fire( 'ok', { hide : true } ).hide !== false )
+							dialog.hide();
+					}
+				}, override, true );
+			};
+			retval.type = 'button';
+			retval.override = function( override )
+			{
+				return CKEDITOR.tools.extend( function( editor ){ return retval( editor, override ); },
+						{ type : 'button' }, true );
+			};
+			return retval;
+		})(),
 
 		/**
@@ -772,19 +794,32 @@
 		 * @field
 		 * @example
-		 * @type CKEDITOR.ui.dialog.button
+		 * @type Function
 		 */
-		cancelButton :
-		{
-			id : 'cancel',
-			type : 'button',
-			label : 'Cancel',
-			style : 'width: 60px',
-			onClick : function( evt )
-			{
-				var dialog = evt.data.dialog;
-				if ( dialog.fire( 'cancel', { hide : true } ).hide !== false )
-					dialog.hide();
-			}
-		},
+		cancelButton : (function()
+		{
+			var retval = function( editor, override )
+			{
+				override = override || {};
+				return CKEDITOR.tools.extend( {
+					id : 'cancel',
+					type : 'button',
+					label : editor.lang.cancel,
+					style : 'width: 60px',
+					onClick : function( evt )
+					{
+						var dialog = evt.data.dialog;
+						if ( dialog.fire( 'cancel', { hide : true } ).hide !== false )
+							dialog.hide();
+					}
+				}, override, true );
+			};
+			retval.type = 'button';
+			retval.override = function( override )
+			{
+				return CKEDITOR.tools.extend( function( editor ){ return retval( editor, override ); },
+						{ type : 'button' }, true );
+			};
+			return retval;
+		})(),
 
 		/**
Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2651)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2652)
@@ -276,4 +276,6 @@
 					return;
 
+				if ( typeof( elementDefinition ) == 'function' )
+					elementDefinition = elementDefinition( dialog.getParentEditor() );
 				initPrivateObject.call( this, elementDefinition, { disabled : elementDefinition.disabled || false } );
 
