Localize app. using Bundle.properties files, need help

Hi! I used tutorial to internationalize my app.:
http://www.oracle.com/technology/products/jdev/101/howtos/jsfinter/index.html
I use Jdeveloper 11g. Have 2 files: LocalizeKokaugi.properties and LocalizeKokaugi_en.properties. My app is internationalized, but when I need to change language then I need use IE or FireFox settings to set language. I have two questions:
1. What I need to do to change language using my created buttons? Can You give step by step to this?
2. Can I set VO -> Attributes -> Control Hints -> Labet Text to #{sampleBundle.myTitle}. I tried this, but then the label value don't comes from my bundle. Where is problem and what to do?
Waiting response from You!
Best regards

Deniz Gulmez wrote:
Hello,
Is below method enough to change the locale for Application Module also? I am trying to change the locale using the below code. Messages from UI project changes as expected but Entity labels and error messages from Application Module are still in old locale.
private void switchToLocale(Locale locale)
FacesContext context = FacesContext.getCurrentInstance();
UIViewRoot root = context.getViewRoot();
root.setLocale(locale);
It should... However I must admit that I rarely push the Locale on the model layer, it does not belongs there, even if ADF encourage that pattern, I highly dislike it and do everything in my power to not have it used in my project. Presentation language is, well, a presentation concern, so should be handled in the presentation layer, not the business one. When the model must send an information, it should be using a code and parameters that then get translated by the view.
Regards,
~ Simon

Similar Messages

  • Multiple use of properties file

    Is there a way to use a properties file for multiple languages?
    ie.
    en_EN points to the en_EN properties file
    I want en_US to also point to that, is this possible? (it now points to default language if not present)
    And anyone got a good tutorial / overview of the possibilities of properties file? have not been able to find a good example that shows all possibilities
    Thanks

    Provide an en version which contains all the English stuff, then put all the en_US and en_EN variants into those files respectively.

  • Using Search_replace.properties file

    I am trying to use Migration assistant to migrate my forms form 6i to 10g.
    While doing so , I want to use search_replace.properties file to search for soem strings and automatically replace them.
    I want to search for 'message_box(' but it is not being read due to this '(' special symbol.
    How can I include special symbols in search or replace string?

    So no reply on this thread...
    I will take look at jdapi, but with my poor knowledge of java ......
    JeanYves

  • Please I'm from Ecuador and I can't put my credit card en App Store. Please I need help  

    Please I'm from Ecuador and I can't put my credit card en App Store. Please I need help  

    Contact iTunes Customer Service
    Apple  Support  iTunes Store  Contact Us

  • Help with localization of a unicode .properties file

    Hi everyone, this is my first time posting anything.  I've googled like crazy but can't find an answer but if this is a repeat just forward me on along to the right spot!
    I'm using Flex Builder 3 for this project.
    We have several .properties files set up that we're converting to Russian.  I have the file set as UTF-8 encoding.  I use the mxmlc command to convert this to a SWF just like we do for our other languages.
    %flex_location%\mxmlc -locale=ru_RU -source-path=%viewMap_resource_sourcePath%\locale\{locale} -include-
    resource-bundles=collections,containers,controls,core,effects,skins,styles,ViewMapBundleSt ringResources
    -output %onefourtwo_loc%\core\framework\NxFramework\bin-
    debug\locale\strings\ViewMapBundleStringResources_ru_RU.swf
    In the code, I call something along the lines of:
    toolBar.title = ResourceManager.getInstance().getString(
    'ViewMapBundleStringResources', 'VIEW_SELECT_TOOLBAR_TITLE');
    this works for every other language, but none of our other languages are Unicode.  In this case, I get null back as the title.
    Any idea what could be going on here?  It seems like something is lost in the conversion from the properties file to a swf.  Like maybe I need to set the encoding somewhere else?  I've run the copylocale command so I have a russian folder in my flex folders, I'm generating the russian swf file and it has a decent size to it, comparable to the English version, just a little bigger.  I have Russian set as my locale, and my browser is displaying russian for sites like Google.  I'm running firefox although we support IE as well.
    Any advice would be helpful, we've been banging our heads on this one for a while!

    We actually got this working just in case any one else runs into this, I had it ENCODED to UTF-8, we actually needed to CONVERT it to UTF-8.  We did this through notepad++ and recompiled and everything is working fine now.

  • Properties File - need some help

    hello, Im trying to figure out how to work with the Properties class. I think it can handle what i'm trying to accomplish. Maybe someone can point me in the direction of some rookie material to read. But anyway heres my dilemma. I need to create some form of structured message that can be saved (properties file), but i don't know how to structure it in the way specified.
    For example, say the message has 3 fields: ID(unsigned int), TIME(unsigned long int), and SIZE(unsigned int)
    I want ID to take up the first 2-bytes of the message, TIME to take the next 4, and SIZE have the remaing 4. Whats the best way to create this? I'm new to this stuff, and looking for some direction...i don't know where to start

    Take a look at the API docs for java.io.DataOutputStream and java.io.DataInputStream. If you are serializing these to the filesystem, you will want to wrap a java.io.FileOutputStream and java.io.FileInputStream with the appropriate data stream type.
    - Saish

  • SecStore.properties file - need to regenerate-Sys Copy of SAP NetW BI 7.0

    Hello Experts,
    I'm having an issue with a follow up activity of a recent System Copy-> SAP NW 2004s ABAP & JAVA Stack ->System copy of our Production BI system to a Sandbox system. (HP-UX servers 11.23 / Oracle 10g) Our SecStore.properties file contains the Production Source system's credentials and I am unable to update the properties using the configtool.sh or offlinecfgeditor.sh scripts. I am receiving the following error:
    system.log from offlinecfgeditor.sh
    ... #2#com.sap.sql.log.OpenSQLException#Error while accessing secure store: The encryption key (usually in the key file) is not the key that is required to decrypt the data in the secure store file or the system name (SID) is wrong..#
    The SID in the below file contains our production sid (BWP) and needs to be (BWX-our target system)
    /usr/sap/BWX/SYS/global/security/data/SecStore.properties
    Is there anyway to reconfigure this property file other than the 2 scipts listed above?
    I have tried to set the file and directory permissions to 777; I'm still getting the same error message. Our properties file still has the source SID within the file (BWP). We want to use the offlinecfgeditor.sh script to change this but we get the error.
    Thanks,
    Laurie

    Hello Manoj,
    Thanks for your reply.  I have tried running the ./configtool.sh.  I am receiving the same error:
    Error occurred while loading the secure store.  Msg: The encryption key (usually in the key file) is not the key that is required to decrypt the data in the secure store file or the system name (SID) is wrong.
    I was told that a system copy (following SAP's recommendation for a system copy) was followed for this target system I'm having an issue with.  A system copy of our production BW system was performed.  The secure store files still contain the Source (production BWP sid within the file).
    Other suggestions?
    Thanks again!
    Laurie
    Full System Log from configtool.sh:
    bwxadm> cat system.log
    <!LOGHEADER[START]/>
    <!HELP[Manual modification of the header may cause parsing problem!]/>
    <!LOGGINGVERSION[1.5.3.7185 - 630]/>
    <!NAME[./system.log]/>
    <!PATTERN[system.log]/>
    <!FORMATTER[com.sap.tc.logging.ListFormatter]/>
    <!ENCODING[UTF8]/>
    <!LOGHEADER[END]/>
    #1.# #1247145554041#/System/Configuration/Logging##com.sap.tc.logging.APILogger.LogController[addLog()]#######Thread[main,5,main]##0#0#Info##Java#TC_LOGGING_CONFIGURATION_NEW_ITEMS[C0000A305666000000000002018FB1F70003D67C779ECE88]##The () has been added to the !#3#Log#./system.log#/System#
    #1.# #1247145554114#/System/Server##com.sap.engine.core.configuration#######Thread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store /sapmnt/BWX/global/security/lib/tools/iaik_smime.jar#
    #1.# #1247145554115#/System/Server##com.sap.engine.core.configuration#######Thread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store /sapmnt/BWX/global/security/lib/tools/iaik_ssl.jar#
    #1.# #1247145554115#/System/Server##com.sap.engine.core.configuration#######Thread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store /sapmnt/BWX/global/security/lib/tools/w3c_http.jar#
    #1.# #1247145554115#/System/Server##com.sap.engine.core.configuration#######Thread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store /sapmnt/BWX/global/security/lib/tools/iaik_jce.jar#
    #1.# #1247145554116#/System/Server##com.sap.engine.core.configuration#######Thread[main,5,main]##0#0#Info#1#com.sap.engine.core.configuration#Plain###ConfigurationManager: found jar for secure store /sapmnt/BWX/global/security/lib/tools/iaik_jsse.jar#
    #1.# #1247145554546#/System/Configuration/Logging##com.sap.tc.logging.APILogger.LogController[setResourceBundleName(String resourceBundleName)]#######Thread[main,5,main]##0#0#Info##Java#TC_LOGGING_CONFIGURATION_IS_CHANGED[C0000A305666000000000000018FB1F70003D67C779CD2B8]##The for the has been changed from to )!#5#resource bundle name#LogController#com.sap.security.core.server.secstorefs.SecStoreFS#<null>#com.sap.security.core.server.secstorefs.SecStoreFSResources#
    #1.# #1247145554546#/System/Configuration/Logging##com.sap.tc.logging.APILogger.LogController[setResourceBundleName(String resourceBundleName)]#######Thread[main,5,main]##0#0#Info##Java#TC_LOGGING_CONFIGURATION_IS_CHANGED[C0000A305666000000000000018FB1F70003D67C779CD2B8]##The for the has been changed from to )!#5#resource bundle name#LogController#/System/Security/SecStoreFS#<null>#com.sap.security.core.server.secstorefs.SecStoreFSResources#
    #1.# #1247145559803#/System/Configuration/Logging##com.sap.tc.logging.APILogger.LogController[setResourceBundleName(String resourceBundleName)]#######Thread[main,5,main]##0#0#Info##Java#TC_LOGGING_CONFIGURATION_IS_CHANGED[C0000A305666000000000000018FB1F70003D67C779CD2B8]##The for the has been changed from to )!#5#resource bundle name#LogController#/System/Database/sql/connect#<null>#com.sap.sql.log.OpenSQLResourceBundle#
    #1.# #1247145559803#/System/Database/sql/connect##com.sap.sql.connect.OpenSQLDataSourceImpl#######Thread[main,5,main]##0#0#Error#1#com.sap.sql.connect.OpenSQLDataSourceImpl#Java#com.sap.sql_0019#com.sap.sql.log.OpenSQLResourceBundle#Exception of type caught: .#2#com.sap.sql.log.OpenSQLException#Error while accessing secure store: The encryption key (usually in the key file) is not the key that is required to decrypt the data in the secure store file or the system name (SID) is wrong..#

  • Use resourceBundle properties file from KM

    Hi,
    I have a properties file called com.mycomp.apps.phonebook.properties in the KM Content of the portal in KM Content => root => mycomp => apps => phonebook => customizing
    Now I'm developing a new LinkCommand service for the UserDetails.
    http://help.sap.com/saphelp_nw04/helpdata/en/65/29b24053c13f5fe10000000a155106/frameset.htm
    The already existing LinkCommand "Send E-mail..." is read from the original resourceBundle com.sap.ip.collaboration.gwui.api.wdf.mail.SendTo
    For my new LinkCommand I would like to use the existing properties file. How do I have to define this file in the uicommand xml or properties xml sheet?
    Can anybody help me?
    With the local project resourceBundle it's working, but I would like to use the file in the KM. Andy ideas?
    Regards,
    Stefan

    Hi Praven,
    Copying all existing SendTo properties file to my project would be an option but I wouldn't win anything.
    I'm quite happy with the existing SAP collaboraton properties files using e.g. for "Send e-mail".
    I won't change this existing ones. I created a new LinkCommand. And for this new LinkCommand I'm looking for a solution how I can handle the translation for it.
    I would prefer e using my existing file which is located in the KM. The reason why it's located in the KM is, if I need to change a translation or add a new translation properties file I only need to change it in the KM. If it's a part of the project I need by every change to deploy the project new.

  • File I/O problems using a Properties file

    Hi,
    I am having troubles reading in a properties file. The file looks like this:
    aname=apassword:word2
    bname=bpassword:word
    ...etc
    The code I have this far is:
    import java.util.*;
    import java.io.*;
    public class LoginH
    public static void main(String[] args)
    String logon, pswd;
    //String login = null;
    //String password = null;
    //String nick = null;
    int msg = 0;
    System.out.print ("Login: ");
    logon = MyInput.readString();
    System.out.print ("Password: ");
    pswd = MyInput.readString();
    Properties settings = new Properties();
    try
    FileInputStream sf
    = new FileInputStream("LogonH.ini");
    settings.load(sf);
    catch (FileNotFoundException e) {}
    catch (IOException e) {}
    // public void whitespaceChars(58,58)
    StringTokenizer st = new StringTokenizer(settings.getProperty(logon));
    String password = st.nextToken();
    String nick = st.nextToken();
    System.out.print (password + nick);
    ** It works fine if i replace the colon in my properties file with a blank space, However i need to use a colon. I tried to set whitespaceChar to allow this but I can not seem to get it to work. Let me know if you have any ideas. Thanks in advanced.

    Thanks. I just got done doing something to that nature however now my problem is if the key field is not in my properties file my program crashes. I need to print out to the console "sorry" if my user name which is my key is not in the properties file. Here is my code if anyone can help me out:
    import java.util.*;
    import java.io.*;
    public class LoginH
    public static void main(String[] args)
    //******** Declare Variables *********************
    String userlogin;
    String userpaswd;
    String login = null;
    String paswd = null;
    String nicknm = null;
    int match=0;
    String delim = ":";
    //******** Get username and password **************
    System.out.print ("Login: ");
    userlogin = MyInput.readString();
    System.out.print ("Password: ");
    userpaswd = MyInput.readString();
    Properties settings = new Properties();
    try
    FileInputStream sf = new FileInputStream("LogonH.ini");
    settings.load(sf);
    catch (FileNotFoundException e) {}
    catch (IOException e) {}
    StringTokenizer st = new
    StringTokenizer(settings.getProperty(userlogin),delim);
    paswd = st.nextToken();
    nicknm = st.nextToken();
    if(userpaswd.equals(paswd))
    System.out.println("Ok " + nicknm);
    match = 2;
    else
    System.out.println("Sorry " + nicknm);
    match = 1;
    if (match == 0) System.out.println("Sorry");
    }

  • How to use JDBC Appender of log4j using a properties file

    Hi,
    I am trying to implement the Log4j JDBC Appender to log the messages to Database(oracle).Can anyone provide me with a sample code along with the properties file used.
    need urgent help.
    Thanks in advance

    Actually, I konw where my problem in my code is. Use functions  
    PDDocAcquirePage(), PDPageGetAnnot(),
    PDTextAnnotGetContents(),
    PDTextAnnotGetContents()
    step by step with the logic designed by ourself can finish my task.
    But also thanks for your help!
     

  • Using Multiple Properties Files in Struts Framework

    Hi Everybody!
    I just to know how to use a multiple message-resources files in a Struts Framework.
    I've 2 properties file :
    1. ApplicationResources_A.properties
    2. ApplicationResources_B.propertiesI put the files under WEB-INF/classes dir.
    My configuration in struts-config file something like below:
    <!--  Begin Testing -->
         <message-resources key="A" parameter="ApplicationResources_A" />
         <message-resources key="B" parameter="ApplicationResources_B" />
    <!--  End Testing -->
    </struts-config>
    if my JSP code is like below , this error is thrown:
    org.apache.jasper.JasperException: Cannot find message resources under key A
      <tr>
        <td width="17%">Language A</td>
        <td width="83%"><bean:message bundle="A" key="user.lang.desc"/></td>
      </tr>
      <tr>
        <td width="17%">Language B</td>
        <td width="83%"><bean:message bundle="B"  key="user.lang.desc"/></td>
      </tr>
    but  if I change the  JSP code like below it  work fine:
      <tr>
        <td width="17%">Language A</td>
        <td width="83%"><bean:message key="user.lang.desc"/></td>
      </tr>
      <tr>
        <td width="17%">Language B</td>
        <td width="83%"><bean:message  key="user.lang.desc"/></td>
      </tr>
    In this code , I dont know  which resources file is used.
    So how do I solve this problem. Thanks you.

    I have defined the following:
    struts-config.xml
    <message-resources key="ldap" parameter="com/project/struts/ldap"/>
    Action.java
    In execute method:
    MessageResources messageResources= MessageResources.getMessageResources("com/project/struts/ldap");
    System.out.println("INITIAL_CONTEXT_FACTORY"+messageResources.getMessage("INITIAL_CONTEXT_FACTORY"));
    and it is working, however I have to change "com/project/struts/ldap" value in Action.java file whenever there is any change in name or location of ldap.properties.
    Can I access this properties in such way that I don't have to change parameter path manually in Action.java (modifying in struts-config.xml is okay)? like access through key="ldap" or something.
    Thanks and regards,

  • Use of properties file

    I need to connect to a database I have specified the driver class and url in a .properties file, I have placed this .properties file in the classes folder of WEB-INF
    once i create the war file and sent it to the client, They need to change the url but since we are delivering a war file they cannot do it. How can i achieve this?

    Use a JNDI datasource so that your code doesn't make a connection to the database but uses JNDI to locate the datasource. Then the client only has to create the datasource at the server level and assign it to the JNDI name.

  • Sending .pdf files -- Need Help.

    Whenever I try to send a .pdf file, it includes the entire file in the body of my email. I want to send it as an attachment. Most people that I send these emails to have a hard time reading the file.
    I hope that makes sense. Thanks in advance for your help.

    It is being sent as an attachment.
    The Mail.app displays all image/photo and single page PDF attachments inline or viewed in place within the body of the message by default which cannot be turned off and is not the same as being embedded.
    You can control-click on such an attachment in the message body and at select View as Icon but this does not change anything in regards to the attachment.
    Depending on the recipient's email client and available preference settings, such attachments may appear inline or viewed in place within the body of the message when the message is opened (as with the Mail.app) or as attached files only which must be opened separately to be viewed which the sender has no control over.
    That being said, there are a few things you should not do with a single page PDF attachment.
    Do not use the Image Size adjustment available at the bottom right of the message window which is intended and should only be used with a picture/image attachment.
    Be sure the file extension is used with the attached file which applies to any attachment.
    When sending attachments to Windows user, be sure to select Send Windows Friendly Attachments - which I have on by default regardless of sending attachments to Windows or Mac users.
    Are you using RTF for message composition and including a Signature?

  • Very weird issue with server logging when using log4j.properties file

    I'm using log4j logging. In log4j.properties the root logger is set up to use the ServerLoggingAppender class so that all our application logs go to the main server logfile. In addition, there are several appenders defined for specific components, with output going to specific per-component log files. Everything is going fine until I launch the server console. At this point all of those per-component log files get wiped out (zero length) and some non-ASCII lines are written to at least one of these files, after which the logs appear to be fine. The main server log file does not appear to be affected (because the root logger is set to "warn" level, while component-specific loggers are set to trace, the contents in these files is different; however I tried disabling all the other appenders and turning the root logger up to trace, and that still did not re-create the problem in the main server log file.
    And here's the really weird part -- if I use the same configuration, but in a log4j.xml file, the problem does not happen.

    Figured it out.
    We were passing in the configuration for log4j as -Dlog4j.configuration=file:/<properties file> and this was added to the command line for both the managed and admin servers. Problem is that the console app starts its own instance of log4j, and when it reads the configuration for the appenders it initializes or rolls over the files. At some point we have two JVMs accessing the same files, so some corruption is bound to happen.
    I'm not clear why the .xml file made a difference, but earlier we had been passing the log4j configuration as a jar file placed in the domain/lib folder, so perhaps the designer reverted to that (placed the log4j.xml file in a jar in lib, and not simply changed the -Dlog4j.configuration=file:/ option.

  • FB app closing by itself, I need help

    So its been about 3 weeks since I updated my FB app on my Iphone4, and for some reason it keeps closing by itself, I am getting annoyed by the fact that every time I want to use the app it just closes. I already tried deleting the app, downloading it again, and I do not what else to do. Please I need help!!

    Can I do this "fix" myself, or at least buy the part somewhere so that someone else who is good with computers can do it for me?
    This is the solution other people with this problem had. 
    Computer repair sent one user this message "Tested without touch panel, hdd, ram, keyboard light. Ordered new motherboard, however discovered that the computer started fine without touchpanel, seems like on/off switch is oversensitive.
    Power membrane switch is replaced, and everything is checked and OK."
    So- power membrane was to blame, and I guess this is just the "underneath" section of the panel of the external power, volume buttons at the top of my key board right?
    "Yes my issue was resolved. They replaced the power button strip above the keyboard which has eliminated the random shutdowns. Funny thing is that they had it less than 24 hours and seems like the "failure analysis engineer" immediately knew what the problem was. I feel sorry for the uneducated who fork over money for unneeded repairs."
    So, since Toshiba seems to try to make you pay 400 dollars to replace a motherboard etc. which won't fix the true problem, is there a site where I can buy the power membrane for my laptop, then take the computer and a part to a repair shop and they will do it?

Maybe you are looking for