Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] localize buttons and text

yes I do think I will do it the way you do your modeltooling but I am
a little confused of how it is working.
Say for example I have a label called like such:
                title = new Label(parent, SWT.CENTER);
		GridData titleLData = new GridData();
		titleLData.heightHint = 69;
		titleLData.grabExcessVerticalSpace = true;
		titleLData.verticalAlignment = GridData.BEGINNING;
		titleLData.grabExcessHorizontalSpace = true;
		titleLData.horizontalAlignment = GridData.FILL;
		title.setLayoutData(titleLData);
		title.setText("Hello");
		title.setData("org.eclipse.e4.ui.css.id", "SeparatorLabel");

To be able to change the text within the label from Hello to say
french. How can I call title in the .properties?

Deirdre.

On 6/8/11, Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx> wrote:
> There are 2 possibilties:
> * doing it in the 3.x way using NLS-System
> * doing it like my modeltooling does it
>
> -http://dev.eclipse.org/viewcvs/viewvc.cgi/e4/org.eclipse.e4.tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java?view=markup
>
> -http://dev.eclipse.org/viewcvs/viewvc.cgi/e4/org.eclipse.e4.tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java?view=markup
>
> -http://dev.eclipse.org/viewcvs/viewvc.cgi/e4/org.eclipse.e4.tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties?view=markup
>
> I think my way of doing it is better because:
> a) messages don't stay in memory for ever
> b) it will support multiple locales at once and dynamic language
>    switching
>
> Tom
>
> Am 08.06.11 21:41, schrieb Deidre Stankard:
>> Hi,
>>
>> I am undergoing localization in my project in eclipse 4.1 and I can
>> localize trimmed windows and on my toolbar etc which are all done in the
>> application.e4xmi using the '%' call in the label.
>> I am just wondering can localization be used in eclipse 4.1 with names
>> on my buttons and text within my GUI as these are called in my java
>> files? and if so how?
>>
>> Regards,
>> Deirdre.
>>
>>
>>
>> _______________________________________________
>> e4-dev mailing list
>> e4-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/e4-dev
>
> _______________________________________________
> e4-dev mailing list
> e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/e4-dev
>


Back to the top