ADF:  Translated XLIFF Resource Bundle not Selected at Runtime

Issue: When I run my ADF app in a web browser where French is selected as the default language, the labels on the form are still populated with English text from the default resource bundle, even though an XLIFF resource bundle for French exists.
Details: I have created a default XLIFF resource bundle containing the text for all labels on my form in English, called labels.xlf. I have also created two translated XLIFF bundles for French and German and named them labels_fr.xlf and labels_de.xlf, respectively.
On my form, I have used value expressions to retrieve the text for each component's label, like label="#{res.language}. JDeveloper added '<c:set var="res" value="#{adfBundle['oracle.fosxliff.uitest.labels']}"/>' to the top of my page, so I could access the resource bundle text. Identifying the resource bundle in the faces-config.xml file does not work. However, I did define which locales are supported by my application in this config file.
*NOTE:* When I access these sames resource bundles in a managed bean by utilizing the locale of the UIViewRoot, the correct XLIFF file is retrieved and the translated text is correctly assigned to my components on the form.
Is there some other configuration that I am missing? I was expecting XLIFF files to work similarly to properties files, which do work correctly regardless of whether the text is accessed using value expressions or managed beans.

Ok, I've found the answer.
I've added translatable custom properties on the view implemention
and access these in the code...

Similar Messages

  • KM Reports : Resource Bundle Not Found Exception!!

    Hello all,
    I am having some trouble in getting the sample reports working. I got the sources from this article :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c739e546-0701-0010-53a9-a370e39a5a20
    It is a simple report. I am able to deploy it on the KM, but when i try to start the report, it throws an exception : "Resource Bundle Not Found".
    The same is the case with another sample report : access statistics report.
    Did anybody else face the same issue? Or if anybody knows a solution to this problem, I would greatly appreciate a response.
    thanks
    -Ajit

    Hi Ajit,
    welcome to SCN!
    You might want to check the defaultTrace to find out more about the error. A bundle file for translation can be included either directly in the report as  shown in slides 23-25 in this presentation: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0fe534f-14f2-2a10-5ba8-fb6b122f430f
    Or you they could be referenced by a meta data extension of a property that is included in the report.
    Hope this helps,
    Robert

  • Resource bundle not found in adapter ear file

              Hi,
              I have an ear file which contains a JCA adapter and a resource bundle properties
              file in a jar file. THis jar file is referenced by the rar file. After deploying
              it, the server generates an resource bundle not found exception. The only way
              to make it deploy is to put my adatper jar to the global classpath. This is not
              consistent with EJB deployment. I tested an ear file that contains an EJB jar
              with contains a resource bundle. The server is able to load the resource file
              from the EJB jar as I would expect. Any comments on that? By the way, I tested
              on WLS 6.1 sp1 and sp2. Thanks.
              Siming
              

              I am having the same problem. Is anything going to be done to fix this?
              "Siming Mu" <[email protected]> wrote:
              >
              >Hi,
              >
              >I have an ear file which contains a JCA adapter and a resource bundle
              >properties
              >file in a jar file. THis jar file is referenced by the rar file. After
              >deploying
              >it, the server generates an resource bundle not found exception. The
              >only way
              >to make it deploy is to put my adatper jar to the global classpath. This
              >is not
              >consistent with EJB deployment. I tested an ear file that contains an
              >EJB jar
              >with contains a resource bundle. The server is able to load the resource
              >file
              >from the EJB jar as I would expect. Any comments on that? By the way,
              >I tested
              >on WLS 6.1 sp1 and sp2. Thanks.
              >
              >Siming
              

  • Resource bundle not found

    Hi,
    I would like to know where to put resource bundle file (it is, something.properties) to be seen in portal channel and background classes
    more info and workabout
    in my class I use resource bundle class Messages which loads resources from bundle "bundles.messages", (equals to file bundles/messages.properties).
    I copies this under /etc/opt/SUNWps/desktop/classes and restarted amserver
    then I created channe from JSPProvider, which displays one resource from this properties:
    <%=Messages.getString("token")%>, but I get on output:
    <pre>!token!</pre>,
    which means properties was not found.
    I havesame problem with third party .jar library which uses properties files. Even after copied oudsite the jar file (i know this must be done) they are not seen.
    thank you in advance,
    Petr Gasparik

    Thank you, vvlier, your advice helped me to move futher.
    I discovered that resource bundles (.properties files) must be directly in `classes` folder to be managed by Portal Server.
    I've put config.properties in /opt/SUNWps/web-src/WEB-INF/classes, then have run `deploy redeploy` command and in /var/opt/SUNWappserver7/domains/domain1/server1/applications/j2ee-modules/portal_1/WEB-INF/classes has appeared config.properties and config_en.properties, which means deploy somehow managed these files
    But still I was unable to fetch records from this file through my own Messages class
    Because this works from console, I have proof my code is working. Only that portal classloader is somewhat different.
    I've red through manual and found this page: http://docs.sun.com/source/817-5319/ch27.html but it doesn't help me.
    It even looks so that I have to use Portal Resource Bundle class?
    So, summary, I have one question:
    How to work with .properties files (Resource Bundles) in Portal?
    thank you in advance

  • Receive error on sparc2.6, w/4.1sp9 sjava resource bundle not found-using default:java.util.MissingResourceException:Can't find resource for base name res.s java, locale en meaning?  Thanks.

     

    This can happen after modifying the calendar properties and not reloading the application. Try reloading or restarting the application. This could also mean the Calendar.properties file has been moved, deleted, or become corrupted. A default properties file can be found at:
    "Tomcat-install-dir"\webapps\"your-web-application"\WEB-INF\classes\defaultPropFile\. Copy this file to: "Tomcat-install-dir"\webapps\"your-web-application"\WEB-INF\classes\. Stop and restart the web server. From a browser, run "hostname"/"your-web-application"/src/setupCalendar.jsp.

  • What are Resource Bundle Best Practices techniques for Enterprise App?

    Regarding JDeveloper: 11.1.1.6.0, Studio Edition
    I was wondering if someone could provide advice on Best Practices for managing Resource Bundles for an international Enterprise Application.
    I have been reading textbooks and throughout the web, and I can find different options available. And I can find cautionary tales to get it right at the beginning of Development, but I cannot find Best Practices suggestions.
    For instance:
    - Should I use XLIFF Resource Bundle, Properties Bundle, or List Resource Bundle?
    - What are the benefits and disadvantages of storing the Key/Value pairs in the database?
    - It seems that storing in the db would make maintenance easier, because applications do not need to be redeployed, but would they be slower?
    - One textbook indicates that "One Bundle per Project" is preferred for ViewController Project, and "One Bundle Per File" is preferred for Model Project. However, I cannot help but think if the whole Enterprise used just one Resource Bundle, it would save typing cust_id/Customer Number in 10 different Bundles.
    - One text indicates how to maintain translated versions of Access Keys, if the Bundle is a Properties Bundle, but provides no assistance for other Resource Bundles.
    Advice regarding Best Practices would be quite helpful.
    Sincerely,
    Arie

    Anyone?

  • Getting String using ResourceBundle and XLIF resource bundle.

    Hello,
    I am using Jdev. 11.1.1.2.0. I am trying to use XLIFF resource bundle in the Model project and trying to get string from the bundle using following code. I am getting MissingResourceException. if I use Property Bundle, it works fine.
    public String getMessage(String code)
    return ResourceBundle.getBundle("model.ModelBundle").getString("MESSAGE1");
    Any help to make it work with XLIFF resource bundle will be appreciated.
    Thanks,
    Amit
    Edited by: Amit Patel on Apr 1, 2010 10:23 AM

    To get the values from the resource bundle, you use the <fmt:message> tag
    <fmt:message bundle="${appbundle}" key="lbl.accountnum"/>

  • Resource bundle is not refreshed from DB table as expected

    Does anybody implement this approach successfully http://technology.amis.nl/2012/08/14/refresh-resource-bundle-from-within-the-adf-application-to-absorb-changes-in-database-backed-bundles to refresh bundle text on BC level (for EOs, VOs, validation texts, ...) in runtime from DB table (where we have stored bundle texts).
    Texts for VC level are refreshed nice, texts (control hints) for BC level are refreshed only first time after application is (re)installed, but after that not any more.
    We create SR for that and Oracle development say this is not a bug, but behaviour.
    But what is the point of having Bundle class for let say EO (http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcentities.htm#ADFFD183 - Example 4-5 Localized Entity Object Component Message Bundle for Italian), if we can't perform runtime proccessing to refresh sMessageStrings.
    Any idea?
    Regards,
    Sašo

    Hi,
    +"But what is the point of having Bundle class for let say EO"+
    The point is to allow applications to be translated into multiple languages so that - based on the user language setting - the application runs with native labels. This works well with the default properties or Java resource bundle in ADF BC. So what doesn't work is the solution you copied from the AMIS blog and you may want to reach out to them if this works for them and if not why. Oracle support is correct in that they cannot support 3rd party samples and demos
    Frank

  • Resource bundle is not build

    Hi,
    I am creating a application in which i want to read some value from .properties file. But when i build my project (using right click project and select Rebuild) this properties file is not copied in the deployed war files in integrated weblogic server . So when running this application it shows error. java.util.MissingResourceException: Can't find bundle for base name
    Can anyone help me out how to include .properties file in build process.???

    Is your resource bundle registered in your project ?
    Go to Project Properties -> Resource Bundle -> Basic Configuration and check if the default Project Bundle name is populated alongwith Resource Bundle type as "Properties Bundle"
    Also another reason might be the following tag might be missing from your jspx/jsff page -
    <c:set var="viewcontrollerBundle"
             value="#{adfBundle['view.ViewControllerBundle']}"/>Edited by: Sudipto Desmukh on May 10, 2012 3:42 PM
    Edited by: Sudipto Desmukh on May 10, 2012 3:45 PM

  • How to use xliff as resource bundle ?

    I used to do Java i18n as following base on resource bundle in properties file format:
    Locale myLocale = new Locale("es", "ES");
    ResourceBundle bundle = ResourceBundle.getBundle("HelloResourceBundle", myLocale);
    System.out.println(bundle.getString("Hello"));I realized that there is new bundle called xliff like:
    <trans-unit id="Hello">
    <source>Hello how are you</source>
    <note>This is message to say hello</note>
    </trans-unit>Does java resource bundle support xliff file similar to properties file? if not, could anybody give an example how to handle xliff file?
    Thanks

    Following code worked for me:
    import oracle.javatools.resourcebundle.BundleFactory;
    import java.util.ResourceBundle;
    * This method retrieves localized strings from a given XLIF resource bundle.
    * @param bundleName The XLIF bundle from which the localized string is to be retrieved.
    * @param key The key of the localized string.
    * @return The localized string retrieved from the given XLIF bundle.
    public static String getXlifLocalizedString(String bundleName, String key) {
    if (StringUtils.isEmpty(key)) {
    return key;
    if (StringUtils.isEmpty(bundleName)) {
    return "[" + key + "]";
    String localizedString = null;
    ResourceBundle resourceBundle = null;
    try {
    resourceBundle = BundleFactory.getBundle(bundleName);
    localizedString = resourceBundle.getString(key);
    } catch (Exception e) {
    LOG.log(Level.SEVERE, "Problem in loading XLIF resource bundle: " + bundleName, e);
    return "[" + key + "]";
    return localizedString;
    }

  • How to use XLIFF file as resource bundle in Java code

    We use xliff as resource bundle for our ADF application. it is has been no problem to have localized message displayed on UI. how ever, I'm wonderring how to use Java code to access xliff as resource bundle which similar to access properties resource bundle. for example:
    Locale myLocale = new Locale("es", "ES");
    ResourceBundle bundle = ResourceBundle.getBundle("HelloResourceBundle", myLocale);
    System.out.println(bundle.getString("Hello"));is it posible to create "HelloResourceBundle" in xliff format?
    Thanks

    Following code worked for me:
    import oracle.javatools.resourcebundle.BundleFactory;
    import java.util.ResourceBundle;
    * This method retrieves localized strings from a given XLIF resource bundle.
    * @param bundleName The XLIF bundle from which the localized string is to be retrieved.
    * @param key The key of the localized string.
    * @return The localized string retrieved from the given XLIF bundle.
    public static String getXlifLocalizedString(String bundleName, String key) {
    if (StringUtils.isEmpty(key)) {
    return key;
    if (StringUtils.isEmpty(bundleName)) {
    return "[" + key + "]";
    String localizedString = null;
    ResourceBundle resourceBundle = null;
    try {
    resourceBundle = BundleFactory.getBundle(bundleName);
    localizedString = resourceBundle.getString(key);
    } catch (Exception e) {
    LOG.log(Level.SEVERE, "Problem in loading XLIF resource bundle: " + bundleName, e);
    return "[" + key + "]";
    return localizedString;
    }

  • Jheadstart oes not generate NLS key in resource bundle for Static domains

    Hello
    according to jhsdevguide1013 on section 6.5.2 about "Translation of static domains" when I check "Generate NLS-enabled prompts and tabs" and run application generator , Jheadstart oes not generate NLS key in resource bundle for Static domains.
    Does anybody can help us for this problem?

    Thank you for reporting this, I have logged it as a bug.
    As a workaround, you can customize the Generator Template default/item/staticDomainOptions.vm
    See http://blogs.oracle.com/jheadstart/2006/11/30#a108 for an example how to let a template generate extra resource bundle keys.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Why is it that the portal bundle not translatable?

    I see that when you create a Webcenter portal application... the Jdeveloper generates these files for you automatically.
    DefaultCatalogBundle.xlf
    ResourceLibraryBundle.xlf
    NavigationRegistryBundleMy first thought would be, then should be translatable to different locale...
    DefaultCatalogBundle_fr.xlf
    ResourceLibraryBundle_fr.xlf
    NavigationRegistryBundle_fr.xlfBut Webcenter just ignores the translation. Anyone knows how to make this translatable?
    Webcenter 11G PS5

    Imran Mirza wrote:
    Neil,
    Just for the confirmation,
    1. Have you registered Fr Locale and Resource Bundles in your Application in faces-config.xml?
    2. Have you set the locale to Fr from browser language or programatically?Hi Imran,
    Can you explain which bundle should I register in my faces-config.xml file? The following bundles I have quoted above are automatically generated by the
    Webcenter portal application.
    Take for example the DefaultCatalogBundle.xlf which is referenced by my default-catalog.xml file.
    <catalogDefinition id="DefaultCatalog" visible="#{true}"
                       resourceBundle="oracle.webcenter.portalapp.catalogs.DefaultCatalogBundle"
                       definitionFilter="oracle.webcenter.portalapp.catalogs.DefaultCatalogFilter"
                       xmlns="http://xmlns.oracle.com/adf/rcs/catalog">Also, regarding your second question. I am doing this programmatically using the youtube link you provided above.
    Thanks

  • ADF 11g can not select and copy data from cell of readonly table in IE

    hi,
    In ADF 11g, when render view object as readonly table with Single RowsSelection, using IE browser can not select and copy data from the cell, but it work in firefox.
    is it a bug?
    Edited by: kent2066 on 2009-5-18 上午8:46

    Hi Timo,
    Sorry forgot to mention versions.
    We are using 11.1.1.7 and IE 9.
    I tried in Google but could not get the solution.
    Kindly let me know solution for this.
    PavanKumar

  • File not found, Missing resource bundle

    Hi
    I have a problem in accessing files (XML and Resource bundles) in Java projects. I used to access these files in WD Java. The same piece of code does not work here.
    e.g. When I create a new file object by providing the path name I get a file not found exception. The file exists in my package and I call it this way:
    File f = new File("file.txt"); then in an input stream but it doesnt work. However in a J2EE project the same code works.
    Similarly the resouce bundle never seems to work even if I give the fully classified class name for the property file. I can access property files in WD Java with ease. I understand that the root path changes and hence the problem. How should I solve it? Is there an elegant way which makes it work in all cases? Please throw some light on the root path for these projects. Thank you.
    regards
    LNV
    Edited by: vln on Jan 16, 2008 9:34 AM

    You should be using
    <b>this.getClass().getResourceAsStream(filePath)</b>
    which will return you an InputStream.
    Check the JDK documentation for the respective methods in java.lang.Class and java.lang.ClassLoader.
    HTH!
    \-- Vladimir

Maybe you are looking for

  • How to remove all special  characters

    Hi, I want to remove all (128-223)the special characters that come in the mapping from the URL http://www.danshort.com/ASCIImap/ 128-223 ,I mean if any characters that come in between these numbered characters I have to remove in mapping. please sugg

  • No Picture on New ads :[

    Hi All, The audio is fine but no pic. Using Panther 10.3.9 and QT 6.5.2 with my 500mhz Cube, 1.2g ram, 120g HD, Geforce2 MX Cube   Mac OS X (10.3.9)   Apples since IIe

  • Question about multiple Airport Extremes

    I have a brand new Airport Extreme connected to my cable modem in my office. I put my older dual-band Airport Extreme in my kitchen to extend my network wirelessly. It wasn't extending very well so I tried to configure it to extend my network over et

  • Odd Email Error Messages

    I received this message on my iPhone today: Cannot get mail The connection to the server "(null)" Failed after plaing around trying to get rid of it, I clicked on sent items. Then when I clicked on my inbox and hit send and receive everything worked.

  • Images Not Showing On Page

    I've been working with Foundation PHP for Dreamweaver and suddenly noticed that the Shadow images on the right rib of the Index page as well as the footer images are not showing on my browser. I'm using IE6. I've looked at the codes in the index pabe