Picking values from two beams of resources for localization in app.

Hi all!

This is my first post and I feel good about it I've created two resource files, and now I want the user to select the language that the app is updated to that locale, here's how I did it.

public static String localizeString(int key) {

        String appLocale = ConfigManager.getLanguage();
        String localizedString = "";

        if(appLocale.equals("en")){
            ResourceBundle _resources = ResourceBundle.getBundle(0x8db49c0ed78e47deL, "com.blackberry.util.LocalizeEN");
            localizedString = _resources.getString(key);
        }
        else if(appLocale.equals("es")){
            ResourceBundle _resources = ResourceBundle.getBundle(0x6185d12a6d73a498L, "com.blackberry.util.LocalizeES");
            localizedString = _resources.getString(key);
        }

        return localizedString;
    }

I put in place two interfaces created by BlackBerry, but when I call this method, he says that the field is ambiguous, probably because he doesn't know what resource to the value. Help, please

Thanks to you all!

Finally, I did what I wanted

if(appLocale.equals("en")){
            ResourceBundle _resources = ResourceBundle.getBundle(LocalizationResource.BUNDLE_ID, LocalizationResource.BUNDLE_NAME).getBundle(Locale.get(Locale.LOCALE_en));
            localizedString = _resources.getString(key);
        }
        else if(appLocale.equals("es")){
            ResourceBundle _resources = ResourceBundle.getBundle(LocalizationResource.BUNDLE_ID, LocalizationResource.BUNDLE_NAME).getBundle(Locale.get(Locale.LOCALE_es));
            localizedString = _resources.getString(key);
        }

I used only a single resource file and simply picked up the using a

Locale.LOCALE_es and Locale.LOCALE_en

According to my app language.

Tags: BlackBerry Developers

Similar Questions

  • I want to loop through the data from two different tables using for loop where the query should be replaced at runtime, please help me

    I have the data into two table with the structure of similar column, I want to loop through the data in these two tables

    based on some condition and runtime that I want to put the query in loop for example, the example is given, please help me

    create table ab (a number, b varchar2 (20));

    Insert into ab

    Select rownum, rownum. "" sample "

    of the double

    connect by level < = 10

    create table bc (a number, b varchar2 (20));

    Insert into BC.

    Select rownum + 1, rownum + 1 | "" sample "

    of the double

    connect by level < = 10

    declare

    l_statement varchar2 (2000);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: =' select * ab ';

    on the other

    l_statement: =' select * from bc';

    end if

    I'm in execute immediate l_statement - something like that, but I don't know

    loop

    dbms_output.put_line (i.a);

    end loop;

    end;

    Something like that, but this isn't a peace of the code work.

    Try this and adapt according to your needs:

    declare

    l_statement varchar2 (2000);

    c SYS_REFCURSOR;

    l_a number;

    l_b varchar2 (20);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: = "select a, b, AB;

    on the other

    l_statement: = "select a, b from bc;

    end if;

    --

    Open c for l_statement;

    --

    loop

    extract the c in l_a, l_b;

    When the output c % notfound;

    dbms_output.put_line (l_a |') -' || l_b);

    end loop;

    close c;

    end;

    /

  • Add up the values from two numeric columns on RTF model

    Hello

    I'm trying to add up the values of the numeric column 2.

    I tried..? column_1 and column_2? > but it's not as simple as that obviously I get an error when you try to do

    I tried..? sum (current - group () / column_1) + sum (current - group () / column_2)? >, but who does no more work that it also returns an error


    Any ideas how to add two numeric columns in RTF model?

    for 2 + 3

     
    
  • OIM11G: Way to get values from dataset of the application for approval

    All,

    How get the application of dataset attribute values in the approval process? (Same as get object data in the process of approval to 9.x).

    I'm looking at the documentation http://download.oracle.com/docs/cd/E14571_01/ doc.1111 /e14309/workflow_service.htm#CIAGFJAB and that doesn't seem to be mandatory in BPEL is.

    The only way that I can think of is to take the RequestID and use the API to find the attribute values dataset query. Any other ideas?

    Kind regards
    BB

    Someone suggested in the following way:

    oracle.iam.request.vo.Request req = reqSvc.getBasicRequestData (reqId);
    String act_key = "";
    String Gestionnairecourrierelectronique = "";
    java.util.List targetEntities = req.getTargetEntities ();
    If (targetEntities! = null) {}
    for (oracle.iam.request.vo.RequestEntity requestEntity: targetEntities) {}
    java.util.List attributes = requestEntity.getEntityData ();
    for (oracle.iam.request.vo.RequestEntityAttribute attribute: attributes) {}
    {if (Attribute.GetName (.equalsIgnoreCase ("Organization")))}
    act_key = attribute.getValue (m:System.NET.SocketAddress.ToString ());
    } else {if (attribute.getName (.equalsIgnoreCase ("Manager")))
    Gestionnairecourrierelectronique = attribute.getValue (m:System.NET.SocketAddress.ToString ());
    }
    }

    Here, Manager and organization are attributes of the dataset.

    Hope this helps the other. Credit to the original supplier.

  • Resources for localization Module help

    Hello
    I have an existing application that I need to locate, I want to use resource bundles as it has a few languages that we support.
    I'm following on flex3 Cookbook page 640 and http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_5.html#158277

    I need to get a list of resources = mxmlc-local-resources-bundle-list = myresources.txt MyApp.mxml
    When I run tis I get this error:
    Error: Access of undefined property JSON

    I use JSON and his works fine.

    Thanks in advance

    OK solved the problem, it was a flex project in flex 2 3
    The project was still point corelib.swc to JSON in flex 2, I copied the corelib folder libs application flex 3 and everything is good.

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

  • Extract single line transformed from two tables

    I have two tables T1 and T2 with the same set of columns. The columns are C1, C2, C3, COND1. I need to issue a query that returns a line transformed in order to respect the following rules:

    1. the returned line may contain values from both tables based on the values of column in table T1.

    2 return the column C1 in table T1; If it is NULL, then return to any value is present in the column C1 of T2.

    3. article 2 above apply to all columns like C1, C2 etc.

    I published the following query. The problem is that if a subquery does not reach the entire query fails. Someone help me please. Probably there is another simple method.

    SELECT NVL (T1.c1, T2.c1) c1, c2 (T1.c2, T2.c2) NVL NVL (T1.c3, T2.c3) c3

    FROM (SELECT c1, c2, c3

    FROM T1

    WHERE cond1 = 'T10') T1

    (SELECT c1, c2, c3

    THE T2

    WHERE cond1 = "T200") T2;

    Hello

    user4274403 wrote:

    I have two tables T1 and T2 with the same set of columns. The columns are C1, C2, C3, COND1. I need to issue a query that returns a line transformed in order to respect the following rules:

    1. the returned line may contain values from both tables based on the values of column in table T1.

    2 return the column C1 in table T1; If it is NULL, then return to any value is present in the column C1 of T2.

    3. article 2 above apply to all columns like C1, C2 etc.

    I published the following query. The problem is that if a subquery does not reach the entire query fails. Someone help me please. Probably there is another simple method.

    SELECT NVL (T1.c1, T2.c1) c1, c2 (T1.c2, T2.c2) NVL NVL (T1.c3, T2.c3) c3

    FROM (SELECT c1, c2, c3

    FROM T1

    WHERE cond1 = 'T10') T1

    (SELECT c1, c2, c3

    THE T2

    WHERE cond1 = "T200") T2;

    Are you saying that if there is no row in t1 that satisfy the condition cond1 = "T10", then you want to keep seeing the lines (and values) of the t2?

    And even, if there is no row in t2 that satisfy the cond1 = "T200" condition, then you want to keep seeing the lines (and values) from t1?

    If so, this looks like a job for a full outer join.

    You can change the join in a full outer join as follows:

    SELECT NVL (T1.c1, T2.c1) AS c1

    , NVL (T1.c2, T2.c2) C2

    NVL (T1.c3, T2.c3) AS c3

    FROM T1

    FULL OUTER JOIN T2 ON t1.cond1 = 'T10 '.

    AND t2.cond1 = 'T200.

    WHERE t1.cond1 = 'T10 '.

    OR t2.cond1 = "T200"

    ;

    If you would care to post CREATE TABLE and INSERT instructions for some examples of data, then I could test this.

    What happens if no table has all the lines that have good values in cond1?

  • execution of a service to read values from the DB

    Hello!

    I have a pretty simple question, but I seem to fail to be able to understand what :

    I have a custom table EUM_DIV.  I have three columns: EUM_1, EUM_2, EUM_3.

    I also created a view based on that table, so that when I call him that from this point of view, it returns all the necessary information

    < $HttpCgiPath$ >? IdcService = GET_SCHEMA_VIEW_FRAGMENT & schViewName = EUM_Division_Abbr_View & IsSoap = 1';

    My job is that I need to extract the value of the column based on the value of EUM_1 EUM_3.  I need then save the extracted value of EUM_3 in a variable for future purposes.  (And this is where I'm stuck) How can I call this service from a resource of IntraDoc?  Must this whole sequence happen when the user select a value in a list of Meta-field option.  I'm sure that the answer must be very streightforward!

    Thank you very much for your help!

    Anya

    executeService uses variables/result sets that have already been defined on your page before calling executeService. This means that you can define variables beforehand and those become the service settings.

    Jonathan

    http://jonathanhult.com

  • Get the value based on the column names for the custom of the Webcenter content metadata field

    University Complutense of MADRID, I created a custom text metadata field.  I then activated optlist this area.  I fill the optList values, I use a view.  The view has three columns.  Let us call their ID, Key, Value.  OptList shows keys in its list.  I then create content (Content ID: MyContent) Webcenter content and choose the OptList values for my new field of metadata (MyField).

    WebCenter portal, I'm filling a selectOneChoice with MyField values in the content ID: MyContent.  Remember the previous step, the values entered in selectOneChoice lists them selected values from the field MyField optList.  The optList is filled from view.  After the user selects a value in selectOneChoice, in Javascript, I need to alert a message in this format "selected value - matching value from the view of the optList that fills MyField.

    In my opinion, only an example will be useful:

    This is a view that I created in Configuration Manager applet in Webcenter content Admin cmdlets :

    ID | State | Capital

    1. North Carolina | Raleigh

    2. California | Sacramento

    3. Illinois | Chicago

    Then I create a custom field (name: MyField).  MyField is an optList values are filled with view created above.  Internal value and the display value are the two State.  Then I have a new content with Content Id Check-In: MyContent.  To MyContent, I select these values in OptList MyField: {North Carolina, Illinois}.

    In my portal Webcenter application, I create a Taskflow presenter content.  I have set up as single content item presenter.  I attribute as content ID MyContent.  Then, in templateView, I get all the values of MyField in MyContent and display as selectOneChoice.  I created a javascript function that would get the value that the user selected in selectOneChoice.  In the view created in the Webcenter content Configuration Manager (see above), there is a value corresponding to each displayed value.  So, for the selected value, I need to get the corresponding Capital and display in my alert message.

    Starting from Javascript, how can I get the value of the Capital, since I have the status value.

    Hello.

    The idea to reach your requirement is planned:

    • Create an Assistant manage bean that will appeal as access map: #{stateUtil ['Calofironia']} (it will return Raleigh). This value will get calling GET_SCHEMA_VIEW_VALUES IDC service using RIDC in your managed bean.
    • Pass the result of #{stateUtil ["statename"]} to your JavaScript function to help

    I hope this information help you.

    Kind regards

  • How to pick up the procedure and the slider for oracle procedure

    How to pick up the procedure and the slider for that?

    SELECT aktualne_notowania.aspolka_id,
    aktualne_notowania.Notowanie * spolki.ilosc_akcji as total
    To aktualne_notowania, spolki
    WHERE aktualne_notowania.aspolka_id = spolki.spolka_id;
    something like

    create or replcae procedure test_proc() is
    v_es_id polski_table.id%type;
    number of v_mult_val;

    cursor c1 is
    Select q.id, (q.quantity * p.price) as total_amount
    the quantity q
    price p
    where q.itemId = p.itemId

    Start

    Open c1
    loop
    Fetch c1 into v_es_id, v_mult_val;
    When exit c1% notfound;

    Update table_target
    total value: = v_mult_val
    where id: = v_es_id;

    end

    Something like this:

    merge into table_target t
    using (select select q.id, (q.quantity*p.price) as total_amount
           from   quantity q
                , price p
           where q.itemId = p.itemId
          ) s
    on    (t.id = s.id)
    when  matched then update
          set t.total = s.total_amount;
    
  • How to pass values from one form to the other setting

    Hello

    I have created two forms Form_A and Form_A. Form_B, having a button "submit" and called the new form of B.
    I have done some calculations in form B. Now I want to spend this calculation value back to Form_A when I press
    My Exit in Form_B button.

    In FormA, just before calling FormB declare and initialize a global variable

    :GLOBAL.PASS_BACK := ''; -- declaration and initialization
    CALL_FORM(FORMB,....);
    --> At this point the :GLOBAL.PASS_BACK variable should have the calculated value from FormB
    

    In the B form to trigger after CHANGE calculated item or KEY of VALIDATION or WHEN - click the BUTTON to exit FormB write - anywhere after the calculation were made

    :GLOBAL.PASS_BACK := ;
    

    For more details, search for the global variables in the form builder help.

    Kind regards

  • in PHP how pass a value from the recordset object via a url

    I have a blog set up with PHP/MySQL with two tables (1 table for blog entry) and 1 table for comments on the blog
    I can view the blog and the comment with a LEFT JOIN recordset like this-
    SELECT golf_blog.blog_ID, DATE_FORMAT (golf_blog.blog_created, "%%b, %Y ') AS blog_created, golf_blog.blog_author, golf_blog.blog_subject, golf_blog.blog_article, blog_comments.comment_article
    FROM golf_blog LEFT JOIN blog_comments using (blog_ID)
    ORDER BY golf_blog.blog_created ASC

    I have a link in the this object recordset repeat region goes to a page containing the comment drag.
    blog_ID is the primary key of the table blog and blog_ID is the index in the array of comment.

    How do you pass the blog_ID of the recordset on a text field in the form of comments via the link insertion?
    Or am even thinking about it in the right way?

    I figured it out and got it to do work in passing the blog_ID as a variable on the URL of the comment form page

    the link looks like this
    ">Comment

    and on the comment page used this code

    $blog_ID = $_GET [$blog_ID]? >

    and the Insert field value is

    I guess that reading David Powers begins to bear fruit. Eureka!

  • Extraction of data from two tables without discounting

    Hi friends,

    I have a problem I want to extract data from two tables without discount in the text field when I will enter any value in a text field, then the value of corressponding must come to textfield corressponding.

    for example. There are two table A and B.
    Table A has Colunm

    S_ID number;
    C_ID Varchar2 (30);
    VARCHAR2 (4) s;

    Second table B Colunm name

    S_ID number;
    What varchar (30);
    L_Name varchar (20);

    When I enter in a text field then the c_id 101 s_id, dry, first_name and last_name should come to corressponding text without refresh fields.

    How can I do that.

    Thank you
    Maury

    You can use Ajax and there are tons of good examples out there for this purpose;
    For example [http://apex.oracle.com/pls/otn/f?p=31517:236:1876567353842241]

  • Hello from Firefox can be used for three or more way call or is it only from person to person?

    Hello from Firefox can be used for three or more way call or is it only from person to person?

    Hi awilcox Hello firefox time can only be used for a direct conversation between two people.

  • Satellite A660-k17: can I remove the two primary partitions used for restoration?

    Hello
    I have 3 questions :) #.

    1. I burned a copy dvd recovery media, on a laptop A660 k17. There are two partitions on the disk that I think are there for the recovery. The first is 1.46 GB and it's for the recovery and another partition hidden 8.29 GB... and I think that the first contains the Recovery Wizard and the whole environment in which we will get through the repair of the system and the hidden disk contains the actuall with windows data, drivers and so on. Can I remove these two? I ask mainly on the first, if it is not necessary for the system to boot or something after that I have to recover the laptop to the factory setting.

    2 and I also want to leave my partitions so that I don't have to partition the whole drive from C 600 GB again. I have a D drive created but there is this response to a topic already in the forum http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=64754&tstart=90
    who says that when I leave the partitions I created myself, that the recovery will be not available. I have a copy on dvd, but only to make sure no kidding something upward.

    3. when I want a clean system without some software which are preloaded on the oem recovery disk... I have to use windows recovery? or it will be the same as the toshiba one?
    Thanks for the reply possible :)
    Beautiful day :)

    > Can I remove the two primary partitions used for restoration?
    First not, but you can remove the Toshiba recovery partition if you created the recovery DVDs. One day, if you want to install the recovery image once again you can use created the recovery disc.

Maybe you are looking for

  • ProtectTools no longer work on my ProBook s 4530 with Windows 8 Pro

    I bought this laptop overpriced for safety functions, not for a long time, but now with a simple OS upgrade Win7 Ultimate Win8 Pro security features is no longer do work, no face or fingerprint features. Any short sugestiond anther brand laptop purch

  • Problems with the upgrade from Windows Vista to Windows 7 error

    I try to upgrade Vista Business 32-bit Windows 7 Home Premium, but I get an error at the beginning of the installation message saying "Windows could not retrieve information about the disks on this computer.  After clicking on the close button, its t

  • Windows 8 to 8.1 upgrade problem 0 x 80070005 0x3000B

    I have problems updating to windows 8.1. Initially, I got error 0 x 80070004, but fixed it. So I can install from the store. The question arises because the installation ends when restarting. In the application settings 98%, an error message appears

  • COMPENSATE Bereinigen Datentr gerbereinigung

    Kann den 8.1 Windows update auf diesen Computer nicht installieren. Download und Installation scheint normal zu laufen, nach dem Neustart green following Fehlermeldung first. Es ist ein Fehler aufgetreten, installieren nicht kann Windows 8.1, therefo

  • Full java support 8 of JDeveloper

    When do we get a Jdeveloper version with full support for Java 8. JDeveloper 12.1.3 allows to use the jdk 8 for testing purposes, but is there any hint of a release date?