Internationalize RCP preference page [message #689359] |
Mon, 27 June 2011 09:51  |
Eclipse User |
|
|
|
hello ,
i was wondering how can i internationalize eclipse RCP preference pages ,to be specific ( org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage) , i checked babel packages but i did not find org.eclipse.ui , it is there ? if not , how can i internationalize this page ?, i tried to create a property file called org.eclipse.ui.internal.themes.ColorsAndFontsPreferencePage_ar_KW.properties and added the required keys and values by copying the output of the follwoing (
ResourceBundle bundle = ResourceBundle.getBundle(ColorsAndFontsPreferencePage.class.getName()) ;
// bundle.
System.out.println("name: "+ ColorsAndFontsPreferencePage.class.getName()) ;
Enumeration<String > list =bundle.getKeys() ;
String temp = new String() ;
while(list.hasMoreElements())
System.out.println("" +(temp=list.nextElement())+"=" +bundle.getString(temp) ) ;
)
i also tried creating a package called org.eclipse.ui.internal.themes , and inside it i created a
file called ColorsAndFontsPreferencePage_ar_KW.properties with the same content but still it did not work.
appreciate your help
[Updated on: Mon, 27 June 2011 09:52] by Moderator
|
|
|
Re: Internationalize RCP preference page [message #689788 is a reply to message #689359] |
Tue, 28 June 2011 07:16  |
Eclipse User |
|
|
|
Mousa.alsulaimi.gmail.com wrote on Tue, 28 June 2011 07:07ok , 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 .
|
|
|
Powered by
FUDForum. Page generated in 0.07937 seconds