Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » internationalize an existing preference page
internationalize an existing preference page [message #689271] Mon, 27 June 2011 05:59 Go to next message
mousa.alsulaimi is currently offline mousa.alsulaimi
Messages: 18
Registered: June 2011
Junior Member
hello ,

how do I internationalize an existing preference page (e.g FontAndColorsPrefrenecePage) , specially when it is final and references an internal class (I can not extend it ) .

thanks in advance .

appreciate your help
Re: internationalize an existing preference page [message #689780 is a reply to message #689271] Tue, 28 June 2011 07:07 Go to previous messageGo to next message
mousa.alsulaimi is currently offline mousa.alsulaimi
Messages: 18
Registered: June 2011
Junior Member
ok , so to internationalize this class you have to do :
1 - create a fragment plugin and let the host plugin be org.eclipse.ui.workbench
2 - create a folder called org then inside it org create eclipse and inside eclipse create ui and inside ui create internal and inside internal create themes .
3- inside themes create a properties file called ColorsAndFontsPreferencePage_ar_KW.properties
copy the content of ColorsAndFontsPreferencePage.properties (you can find this in org.elcipse.ui.workbench plugin see package (org.eclipse.ui.internal.themes )to your new file (ColorsAndFontsPreferencePage_ar_KW.properties) with the modification that you need :
content of original file (ColorsAndFontsPreferencePage.properties)
###############################################################################
# Copyright (c) 2003, 2010 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
#     IBM Corporation - initial API and implementation
###############################################################################

openChange=&Edit...
reset=&Reset
editDefault=Ed&it Default...
goToDefault=&Go to Default
value=&Value
colorsAndFonts=Colors and &Fonts (? = any character, * = any string):
description=Descriptio&n:
preview=Previe&w:
noPreviewAvailable=No preview available.
errorCreatingPreview=There was an error creating this preview.  Please see your log for details.
errorCreatePreviewLog=Error creating preview.
errorDisposePreviewLog=Error disposing preview.
defaultFormat_default={0} (set to default: {1})
defaultFormat_override={0} (overrides default: {1})
editParent=&Go to parent
boldFont=Bold
italicFont=Italic
fontTextSample=The quick brown fox jumps over the lazy dog.
fontColorSample=Sample text


content of new file (ColorsAndFontsPreferencePage_ar_KW.properties)
goToDefault=&al thahab el alasel 
editDefault=ta3deel...
colorsAndFonts=\u062d\u062f\u062b \u062e\u0637\u0623 \u0623\u062b\u0646\u0627\u0621 \u0642\u0631\u0627\u0621\u0629 \u062a\u0648\u0635\u064a\u0641 \u0627\u0644\u0627\u0633\u062a\u0639\u0631\u0627\u0636:
italicFont=ma2el
errorCreatingPreview=hadath 5ata2 5elal el mu3ayana.
openChange=&ta3deel...
errorCreatePreviewLog=5a6a2 fee takween al mu3ayana.
errorDisposePreviewLog=5a6a2 fe enha2 al mu3ayana.
defaultFormat_override={0} (overrides default: {1})
preview=mu3ayana:
description=wasef:
boldFont=sameek
noPreviewAvailable=al mu3ayaba '3eer muta7a.
defaultFormat_default={0} (thabe6 al asel: {1})
value=&8ema
fontColorSample=3ayeenat 5a6 
reset=&e3adat '6abe6
editParent=&al thahab el al masder
fontTextSample=\u062d\u062f\u062b \u062e\u0637\u0623 \u0623\u062b\u0646\u0627\u0621 \u0642\u0631\u0627\u0621\u0629 \u062a\u0648\u0635\u064a\u0641 \u0627\u0644\u0627\u0633\u062a\u0639\u0631\u0627\u0636.




4 - include the fragment plugin to your run configuration .

run the application and see for your self .







Re: internationalize an existing preference page [message #695789 is a reply to message #689271] Tue, 12 July 2011 10:39 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 27.06.2011 11:59, forums-noreply@eclipse.org wrote:
> hello ,
> how do I internationalize an existing preference page (e.g
> FontAndColorsPrefrenecePage) , specially when it is final and
> references an internal class (I can not extend it ) .
See http://www.eclipse.org/babel/

Dani
>
> thanks in advance .
> appreciate your help
Previous Topic:[FIXED] Save icon issues between pages in multi page editor
Next Topic:How can I create a texteditor with hyperlink support?
Goto Forum:
  


Current Time: Fri Aug 29 10:18:57 EDT 2014

Powered by FUDForum. Page generated in 0.01766 seconds