Question

I have uploaded my app through the vendor portal on the BB app world. I have given the description for my app in English as well as Spanish. But when I see the link for the submitted app, the description is in English only. Is there anyway I can make Spanish as the primary language.

This is the link for the app: http://appworld.blackberry.com/webstore/content/107905/?lang=es

Was it helpful?

Solution 2

Check out the link for more information

http://www.javabeat.net/qna/37-what-is-the-use-of-resourcebundle-in-java/

If i am not wrong ... Resource Bundle is the answer

OTHER TIPS

Use ResourceBundle which has a answer to your solution

Check out the link in BB site http://docs.blackberry.com/en/developers/deliverables/12002/Localizing_BlackBerry_Application_projects_655976_11.jsp

this might help you to create a ResourceBundle Below is a sample program that converts from English to French and vice versa on click of button

public class Screen extends MainScreen implements AppResource{
    LabelField lf1,lf2;
    ResourceBundle rb;
    ButtonField Convertor;
    boolean eng;
    Screen()
    {

        Convertor=new ButtonField("Convert to French");
        eng=true;

        rb=ResourceBundle.getBundle(AppResource.BUNDLE_ID, AppResource.BUNDLE_NAME);
        lf1=new LabelField(rb.getString(LABEL));
        lf2=new LabelField(rb.getString(TEXT));
        add(lf1);
        add(lf2);
        add(Convertor);
    }

    protected boolean navigationClick(int status, int time) {
        // TODO Auto-generated method stub

        Field f=getFieldWithFocus();

            if(f==Convertor)
            {
                if(eng==true)
                {
                    Locale.setDefault(Locale.get(Locale.LOCALE_fr, null));
                    lf1.setText(rb.getString(LABEL));
                    lf2.setText(rb.getString(TEXT));
                    eng=false;
                    Convertor.setLabel("Convert to English");

                }
                else if(eng==false)
                {

                Locale.setDefault(Locale.get(Locale.LOCALE_en, null));
                lf1.setText(rb.getString(LABEL));
                lf2.setText(rb.getString(TEXT));

                eng=true;
                Convertor.setLabel("Convert to French");

                }

            }

        return super.navigationClick(status, time);
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top