I18n

Hi all,

I have little doubt.

I create the sample applications i18n.

In my application, I create i18nSupporResource.rrh, i18nSupportResource.rrc, I18nSupport_en.rrc and I18nSupport_us.rrc.

I can able to retrieve the values of I18nSupport_en.rrc. properties file.

How do we get the and I18nSupport_us.rrc also. The location code is followed.

import net.rim.device.api.i18n.*;

/**
 *
 */
public class Localization  implements I18nSupportResource
{
    static Localization ref=null;
    ResourceBundle resource=null;

    private Localization()
    {
      resource=ResourceBundle.getBundle(I18nSupportResource.BUNDLE_ID,I18nSupportResource.BUNDLE_NAME);
      //Locale locale=Locale.get(

    }

    public static Localization  getInstance()
    {
        if(ref==null)
        {
            ref=new Localization();
        }
        return ref;
    }

    public String getTitleValue()
    {
        return resource.getString(I18nSupportResource.APPLICATION_TITLE);
    }

    public String getContentValue()
    {
        return resource.getString(I18nSupportResource.TEXT_CONTENT);

    }

}

I have to recover from I18nSupportResource_us.rrc. How to do this?

Thanks in advance.

simon_hain wrote:

It would be the files:

appname_en_US. RRC

appname_cn. RRC

appname_jp. RRC

This isn't quite right...  Chinese is zh and Japanese is ja.

Drew

Tags: BlackBerry Developers

Similar Questions

  • i18n DateFormat using bb::utility:i18n, error

    do you have my Date using QLocale internationalization, e.g.

    myLocale.toString(myDate, QLocale::ShortFormat);
    

    works as expected

    Now, I wanted to use the MEDIUM format provided by Cascades i18n as described here

    Added to my .pro

    -lbbutilityi18n
    

    included the DateFormat

    #include  
    

    end tried to use

    myLocale.toString(myDate, bb::utility::i18n::dateFormat(myLocale, bb::utility::i18n::DateFormat::Medium));
    

    Compiler says

    error: 'dateFormat' is not a member of 'bb::utility::i18n'
    

    no idea what could be the problem?

    Add...

    #include 
    
  • things i18n

    I need my application in Sib i18n. I have no knowledge about i18n in BB. Can you share what and how?

    Thanks in advance,

    Bala.

    rrc files contain the values

  • i18n for the dialog field

    Hi all,

    I have little doubt I18n.

    I have to show YES/NO type dialog to save the changes.

    My question is to know how to locate the button YES and in the field of dialogue?

    Thanks in advance.

    Sorry for my English.

    the dialog box is automatically localized. If you want to use a specific string, you must define your own dialog box. You can do this by using another manufacturer (with choice of object []) or, if you want all customized by using popupscreen.

  • Problems when using i18n

    Hello Experts!

    I do some itens for i18n, initially my build has worked well, but after that, every place where I use the reference for i18n interface generates the problem, because the directory interface was generated

    I have to create again the HR files and works very well.

    Best regards, Rampelotti.

  • Advice on the use of the oracle.apps.aia.core.eh.i18n.EHCorrectiveActionRB

    Hello

    I'm trying to implement the AIA error handling and reading that AIA provides xpath functions to retrieve the error code messages and corrective action messages. the documentation says that you must use the oracle.apps.aia.core.eh.i18n.EHCorrectiveActionRB listresourcebundle class to do this.

    My questions are:

    1. this oracle.apps.aia.core.eh.i18n.EHCorrectiveActionRB of the class already exists within the AIA in order to add the new error etc... you just need to change?
    2. If the above is true then where can I find this class to add new messages?
    3 this Listresource bundle must be implemented in all composite samples of AIA? If yes how can I do this?
    3. does anyone have examples that I can use to implement the management of errors?
    4. all other general advice on the use of this list of resources group

    Thank you for your help in advance.

    Kind regards.
    Adrian

    1. this oracle.apps.aia.core.eh.i18n.EHCorrectiveActionRB of the class already exists within the AIA in order to add the new error etc... you just need to change?
    Yes, they exist oob with FP. In 10g, it will be under system/classes/bpel file.
    2. If the above is true then where can I find this class to add new messages?
    In 10g, it will be under system/classes/bpel file. 11 g, it will be under /soa/modules/oracle.soa.ext_11.1.1/classes folder.
    3 this Listresource bundle must be implemented in all composite samples of AIA? If yes how can I do this?
    No, the bundle is a single resource, and you can add your messages in the same class.
    3. does anyone have examples that I can use to implement the management of errors?
    Please see available in OTN download AIADemo. All composite materials have the error handling.
    4. all other general advice on the use of this list of resources group
    11 g class of resource bundles is replaced by a file of text properties.

  • I18n in managed Bean

    Dear all,

    I'm the stage location with this code in my JSF file.
    <af:outputText value="#{pageFlowScope.myBean.date}" id="ot3">
         <af:convertDateTime locale="#{pageFlowScope.myBean.locale}"/>
    </af:outputText>
    But what happens if the opposite is true and I need to do in my
    managed bean? So what is the right way to execute i18n in a managed bean.

    So instead of the code above, I'll just do it like this.
    <af:outputText value="#{pageFlowScope.myBean.dateFormatted}" >
    I know, the use case is a little vague, but there are other reasons behind it. Thank you

    Hello

    you use SimpleDateFormat (String pattern, locale locale)

    http://download.Oracle.com/javase/1.4.2/docs/API/Java/text/SimpleDateFormat.html

    on the simpleDateFormat call you "analyze" the method to get the date in the form

    Frank

  • i18n: changing enum to... class static fields?

    Hello

    I am involved in a project where I had some enums. This enum has benefited from the latest versions, so I got something very standard as:
    public enum MyEnum{
       ONE("one"),
       TWO("two");
    
       private final String literal;
    
       private MyEnum(String literal){
          this.literal = literal;
       }
    
       @Override
       public String toString(){
          return literal;
       }
    }
    I have not only one, but several of them. My problem is that I might need to translate these literals in several languages and I'm not sure which is the best way to do it. I thought about having several singletons in my main class. Once we know the language, I'd get these names from a .properties file and initialize these singletons, but I really think that sounds bad. Who is the best practice in this scenario?

    Maybe a singleton class that contains a map with (key, translation) and I ask for these names to the object?

    Thank you!
    Luis

    ldepablo wrote:
    OK, so I'll give it another chance ;-)

    Let's say I have i18n-IZE the app, so I put the enum value TWO that gets the value "zwei" of my numbers_de.properties. Where should I save these values?

    You could look for a group of resources, each time, or you could store in a card in or outside the enum to be retrieved by a suitable research method.

    I would say in a list/map in some singleton component in my factory class.

    I don't know enough about your needs or design to comment on where the map should be live. I don't know why you consider the list, since you probably want to get these things by keys. In other words, you do not use TWO as the number 2, but rather as a constant to get you the key to look up the word "two". You will also have an enum value DOG, with a literal "dog", so that you can find "hund" (or other) in German, "perro" in Spanish and "inu" in Japanese, Yes? For a list wouldn't you do much good for looking for these things.

    Or am I missing something?

    Later, I read the word "zwei" in the source, and want to know what value corresponds to "zwei", so I search for "zwei" in my list/map, get his position, which would be the 'second' and that way I'll know the result's 2.

    Why do you need to know the position? That makes sense to me, especially in view of the fact that the cards have indices.

    But if you need a means of correspondence between the word 'zwei' return to his forefinger--or its value enum TWO - key then just build two maps, one for each direction.

  • I18n support?

    Hello

    Flex support I18n?

    I mean in the sense to group all the texts of the application into multiple files txt or properties and their translations for different languages. As I am planing to develop business applications, it is a crucial requirement because a large number of languages to be supported.

    What is the way to flex for this?

    Kind regards

    Tom

    Read my post from Flex 3 Cookbook on the localized files frame construction. It will be essential to the construction of a well internationalized application:

    uctId = 2 http://www.Adobe.com/cfusion/CommunityEngine/index.cfm?event=ShowDetails&PostID=11486&prod & loc = en_US

    If this post answers your question or assistance, please mark it as such.

  • i18n type obsolute

    Hello BB devs

    My application is almost completed and ready to be packed. But I can't get the app to be internationalized.

    I have 2 different web URL for 2 different languages. So I put them in my Application.ts and Application_fr.ts. The name of the application successfully. Therefore the title on my screen is translated.

    But for the url, it always puts type = "obsolute" in the xml file. Example:

    
    
    
    
        Application
        
            webUrl
            http://frurl.fr
        
    
    
        main
        
            Application
            French stuff
        
    
    
    

    So, when I remove the type = "obsolute", when I click "Run", he just put it out there. It's really annoying me...

    Anyone nows the problem here?

    Thank you

    I solved it.

    You must put this in your Application.pro file

    lupdate_inclusion {
        SOURCES += \
            $$BASEDIR/../src/*.cpp $$BASEDIR/../assets/*.qml
    }
    
  • How is used with fx i18n resources: include?

    I can't seem to get bundles of resources working with fx: include.  This old post suggests it should work, but I'm running into two different errors.  I downloaded a very simple example here:

    https://DL.dropboxusercontent.com/u/8788282/sample-app.zip

    The example has everything set up the way I expect to work.  When I open "MainView.fxml" with SceneBuilder (7 bundled JRE), I get a MissingResourceException.  When I try to run "SampleApp" using JDK8-b111 I get a NullPointerException.  In the second case, it seems that fxmlloader might be passing a null to ResourceBundle ClassLoader.

    Does anyone know how to use beams of resource with nested views?  The Introduction of to FXML. JavaFX 2.2 docs silence resources fx: includes, but does not explain how it is supposed to work.

    A possible workaround is to make sure the ResourceBundle you go to your main FXMLLoader is not loaded by the system class loader. I think that the best way to proceed is to wrap the resource group, you get in the usual way in a trivial wrapper implementation. Something like this:

    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.util.Set;
    
    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    
    public class ResourcesTest extends Application {
    
     @Override
      public void start(Stage primaryStage) throws IOException {
           ResourceBundle resources = new ResourceBundleWrapper(ResourceBundle.getBundle("resources.Resources"));
           System.out.println(this.getClass().getClassLoader());
           System.out.println(resources.getClass().getClassLoader());
           FXMLLoader loader = new FXMLLoader(getClass().getResource("ResourcesTest.fxml"), resources);
           Parent root = (Parent) loader.load();
           Scene scene = new Scene(root, 300, 120);
           primaryStage.setScene(scene);
           primaryStage.show();
      }
    
      public static void main(String[] args) {
           launch(args);
      }
    
     // this class effectively does nothing, but it will be loaded by the
     // application class loader
     // instead of the system class loader.
      private static class ResourceBundleWrapper extends ResourceBundle {
    
           private final ResourceBundle bundle;
    
           ResourceBundleWrapper(ResourceBundle bundle) {
                this.bundle = bundle;
           }
    
           @Override
           protected Object handleGetObject(String key) {
                return bundle.getObject(key);
           }
    
           @Override
           public Enumeration getKeys() {
                return bundle.getKeys();
           }
    
           @Override
           public boolean containsKey(String key) {
                return bundle.containsKey(key);
           }
    
           @Override
           public Locale getLocale() {
                return bundle.getLocale();
           }
    
           @Override
           public Set keySet() {
                return bundle.keySet();
           }
    
           }
    }
    

    The simplest workarounds is may be possible, but I don't see one right now...

  • JavaFX, I18N, FXML and me

    Hello all!

    I'm looking for ideas on how to to internationalize/locate my FXML JavaFX application file. I am familiar with the method of bundle traditional resources and use that in my controller for everything I do in the user interface during execution, but, obviously, I need to extend that to my FXML file as well. Here are a few thoughts on how I could address the issue:

    * A FMXL file that is dynamically loaded for each locale I support? (I don't like this approach that minor changes to my XML must be propagated to all of the locale specific versions).
    * Or... Somehow through the scene graph once the FXML is responsible, looking for text I can load from a resource group.

    I hope you JavaFX veterans may know a better way to handle this.

    Thank you very much!

    -Zep

    You can use the resources resolution operator to locate a FXML file when it is loaded:

    http://docs.Oracle.com/JavaFX/2/API/JavaFX/fxml/doc-files/introduction_to_fxml.html#resource_resolution

    You just pass FXMLLoader an appropriate resource bundle at load time.

  • I18n and dataprovider

    Hello

    I'm trying to implement the internationlization for an application. The language must be changed during execution that is why I use the functionality of flex's ResourceManager. My problem is that some of our widgets app like comoboxes using dataprovider to be filled. If I change the language these widgets are not updated. Here is a code example:

    < mx:ComboBox id = "combo" dataProvider = "{comboArray}" / >

    the dataprovider is initialized in the method view onApplicationComplete


    comboArray = [{label: resourceManager.getString ('language', 'form.value1.label'), data: 'test1'},]
    [{label: resourceManager.getString ('language', 'form.value2.label'), data: 'test2'}] ;

    Can someone give me a clue how to solve this problem or best practices?

    Kind regards

    Hi mwoodpecker,

    When you change the language of the application... try to rebuild the table comboArray and reset the dataprovider for your

    ComboBox.

    This will solve the problem.

    Thank you

    Jean Claude

  • I18n, L10N, G11N and related things

    Hi you all:

    I am working on a bilingual project and will soon get in the scene where data needs to be more than just English. But it can be so simple, at least for me, since I've never worked with databases in this context.

    Imagine a table that lists the categories any. I thought about the following:

    1. do you have a table of categories for each language - which seems crazy.

    2. have you page a/model different for each language - even crazier!

    3. a group of resources with all the names of the category in two or more languages; then, in the database, NOT stores the names of the categories, but the names of resource bundle key and write a CFC, when one of its functions is to retrieve the name of the key to the database and extract the key value in the appropriate rb.properties (bundle) file.

    Of the foregoing, I tend to go to #3. But with no experience in this, I would like to hear from someone on how to address the issue, because I want to do proper planning before embarking on something that can turn out to be the wrong solution.

    Any ideas? Where are Paul Hastings, you?.

    Kind regards

    Carlos

    Hey Carlos,.
    I can see why the example I used was a bit confusing. First of all, let me start by trying to clarify what I wanted. BTW - the and commercial have been simply part of the category name, not really anything to do with the table formatting.

    The idea that I proposed was to have a table with 3 columns:
    Category (your key category goes here)
    Language (what language the text is in)
    Category_Text (your translated text category)

    So instead of needing a new column for each language, you can use 1 domain (language) to ID what language the text is to:

    Record 1:
    Category: food
    Language: English
    Category_Text: Food and meal

    Sheet 2:
    Category: food
    Language: Italian
    Category_Text: Cibo e Cena

    You can then use your SQL queries to pull up the correct Category_Text for a given language.

    Unfortunately, the site we currently have running in 3 languages, we have now switched back to just being in English (due to a business of the higher ups decision) - maintenance costs of the current professional translations being a bit too high for the performance received in liquidation.

    I think that you should definitely check post of Peey on the resources of rb. I had not worked much with rb in the past and Peey defintely has a little more experience in this area.

  • I got the email infected - how can I get rid of him?

    < script type = "text/javascript" >

    var _gaq = _gaq. [];
    _gaq.push (['_setAccount ',' UA-21595156-1 ""]);
    _gaq.push (['_trackPageview ']);

    (function() {}
    GA var = document.createElement ('script'); GA.type = ' text/javascript '; GA. Async = true;
    GA. SRC = ("https:" == document.location.protocol? "https://ssl": "http://www") + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName ('script') [0]; ParentNode.InsertBefore (ga, s);
    ()}) ; / script >

    < meta http-equiv = "Content-Type" content = text/html"; Charset = UTF-8 "/ >"

    < meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7" / >
    "< link rel ="stylesheet"href =".. / js/dojotoolkit/dojo/Resources/dojo. "CSS? 2 - 6.01_164849" type = "text/css" / >
    "< link rel ="stylesheet"href =".. / js/dojotoolkit/dijit/themes/dijit. "CSS? 2 - 6.01_164849" type = "text/css" / >
    "" < link rel = "stylesheet" href = "... /js/dojotoolkit/dojox/Grid/_grid/Grid.CSS?2-6.01_164849" type = "text/css" / >
    "" < link rel = "stylesheet" href = "... /js/dojotoolkit/dojox/Grid/Resources/Grid.CSS?2-6.01_164849" type = "text/css" / >
    "" < link rel = "stylesheet" href = "... /js/dojotoolkit/dojox/iconGrid/Resources/DataIconGrid.CSS?2-6.01_164849" type = "text/css" / >
    "< link rel ="stylesheet"href="css/main.css?2-6.01_164849 "type =" text/css"/ >
    "< link rel ="stylesheet"href="css/Default.css?2-6.01_164849 "type =" text/css"/ >
    "< link rel ="stylesheet"href="css/dijit/Editor.css?2-6.01_164849 "type =" text/css"/ >
    < script type = "text/javascript" >
    trace = function (txt) {};
    var djConfig = {}
    cacheBust: ' 2 - 6.01_164849. "
    templateForAutomation: false,
    isDebug: location.href.indexOf ('isDebug = true')! = - 1, //to activate firebug lite, add 'isDebug = true' for the URL
    Popup: true,
    forceFirebugLite:true,
    parseOnLoad: false,
    defaultDuration: 1 / / override dijit.defaultDuration for animation
    };
    (function() {}
    getParameter var = {function (paramName)}
    paramName += «=»
    queryString = window.location.search var;
    var strBegin = queryString.indexOf (paramName);
    If (strBegin is-1) {}
    strBegin = queryString.length;
    } else {}
    strBegin += paramName.length;
    }
    var strEnd = queryString.indexOf ("&", strBegin);
    If (strEnd is-1) {}
    strEnd = queryString.length;
    }
    Return queryString.substring (strBegin, strEnd);
    }
    var local = getParameter ("lang");
    If (locale.length > 0) {}
    djConfig.locale = locale.toLowerCase ();
    If (locale.toLowerCase ()! = 'en')
    djConfig.extraLocale = ['at'];
    }
    If (regional settings == 'ar': local == 'iw') {}
    djConfig.direction = document.getElementsByTagName ("html") .dir [0] = 'rtl ';
    }

    })();
    < /script >
    "" < script src = "... /js/dojotoolkit/dojo/dojo.js?2-6.01_164849" type = "text/javascript" > < / script >
    < script type = "text/javascript" >
    Dojo.require ("dojo.date.locale");
    Dojo.require ("dojo. Parse");
    Dojo.require ("dijit. ProgressBar");
    dojo.registerModulePath ("iwc", "..") /.. ("/ iwc ');
    dojo.requireLocalization ("iwc.i18n", "resources");
    IWC.l10n = dojo.i18n.getLocalization ("iwc.i18n", "resources").

    To report the progress of an operation of loading:
    * first to publish the update
    * then wrap the load operation in a timeout
    This allows the browser to update the bar before you start the load operation.

    {dojo.addOnLoad (function ()}
    Dojo. Publish ('curtainProgressUpdate', ['dojo_base'] [5]);
    {setTimeout (function ()}

    Dojo.require ("dijit. Layout.BorderContainer");
    Dojo.require ("dijit. Layout.ContentPane");
    Dojo.require ("dijit. Layout.StackContainer");
    Dojo.require ("dijit. Layout.TabContainer");

    Dojo. Parser.Parse (dojo. Body());
    Dojo. Publish ('curtainProgressUpdate', ['iwc_base'] [10]);

    {setTimeout (function ()}
    Dojo.require ("IWC.kernel"); defaultConfig gets secureToken value
    Dojo. Publish ('curtainProgressUpdate', [15, ["'user_prefs"]]);
    {setTimeout (function ()}
    Dojo.require ("IWC.bootstrap");
    Dojo. Publish ('curtainProgressUpdate', [20, ['theme']]);
    {setTimeout (function ()}
    iwcApp = new iwc.kernel ();
    document.title = iwc.l10n.login_product_name;
    {setTimeout (function ()}
    We need to charge haver the kernel is loaded.
    iwc.themes.loadSelectedItem ();

    create and join the banner (require bootstrap + core ran)
    try {}
    banner var = new iwc.widget.Banner ();
    Console.log ("Created", banner.domNode);
    Console.log (dijit.byId ("iwcBanner"));
    dijit.byId("iwcBanner").domNode.appendChild (banner.domNode);

    create and attach the quick navigation
    dijit.byId("iwcLayoutNavigation").addChild (new iwc.widget.QuickActions ({region: "top"}));

    var oldHandler = window ["onbeforeunload"] | function() {};
    iwc.oldEventHandler ["onbeforeunload"] = oldHandler;

    Setting height static/fixes for Android Tablet
    If ((dojo.isAndroid & & dojo.isTablet)) {}
    var initialSize = dojo.marginBox (dojo.body ());
    Dojo.style (dojo. Body(), 'height', initialSize.h + 'px');
    var handlerOrientationChange = dojo.connect (window, "orientationchange", function() {}
    Dojo.style (dojo. Body(), 'height', window.innerHeight + 'px');
    });
    }

    Window.onbeforeunload = {function (evt)}
    var message = iwc.l10n.navigateAwayWarning;
    var number = iwc.openFormManager.getCount ();
    {if (IWC.session_invalid_redirect)}
    return;
    }
    If {(County)
    message = dojo.string.substitute (iwc.l10n.navigateAwayWithOpenFormsWarning, {count: count});
    }
    If (typeof evt == "undefined") {/ / IE}
    evt = window.event;
    }
    If (evt) {}
    evt.returnValue = message;
    }
    return the message;
    }
    } catch (e) {}
    },0);
    },0);
    },0);
    },0);
    },0);
    });

    {dojo.addOnWindowUnload (function ()}
    iwcApp.destroy ();
    });

    < /script >

    < script type = "text/javascript" >
    function popup (mylink, windowname) {}
    If (! window.focus) return true;
    var href;
    If (typeof (mylink) is 'chain')
    href = mylink;
    on the other
    href = myLink.href;
    Window.Open (href, windowname, "menubar = no, width = 620, height is 560, toolbar = no, resizable ="Yes");
    Returns false;
    }
    < /script >

    So, what are you doing? Displaying the source code of infection or what? Hopeful this site contains a bug so that we can all be infected?

    You actually tried to delete and to compact your folders?

Maybe you are looking for

  • 12 Firefox not updated to 13

    Hello, I currently have 12 of Firefox on Mac OS X 10.7.4, when I learned that 13 had been released I clicked on Firefox > about to search for the update, but the green icon appears and tells me that 12 is the latest version. Thunderbird updated to 13

  • Display drivers crashing when connecting Skype with a new monitor BenQ

    Hello, so I just got a new BenQ XL2411Z monitor and for some reason, when I connect on Skype, display drivers crash 9/10 times. If I use the old monitor and launch Skype everything works normally, but display runnning drivers the new BenQ it will cra

  • Qosmio X 770 - would be partitions retractable affect HDD Recovery?

    There are three default partitions - 1.5 (active) GB, 450 GB (Windows 7) and 15 GB (HDD Recovery), all three primary type. I want to shrink the partition Windows 7 average ("C:", 450 GB) to make another partition primary or logical free space unalloc

  • Display driver incorrectly installed on the pc, bad resolution on pc

    Hi, guys! I have a little problem with my pc. I own a Compaq Presario CQ57 and I recently reinstalled my windows 7 Ultimate 64 - bit Windows, due to a problem of windows. The person who installed the windows and the drivers, installed the wrong displ

  • Where can I enter the product key for Vista upgrade to Windows 7 Professional?

    I bought Windows 7 Professional PIN from Best Buy. I was told that I could move from Vista by going nd online during extraction of the key using the PIN code.  I got the key and follow the instructions. After clicking on upgrade of Windows antime a b