How to implement resource bundle in Arabic
In my project we are using English and French language.. Now the Arabic language has to be used.. Did any one have idea of using Arabic in core java.
Follow the below mentioned steps ::
1) make a properties file say mymessages.properties alongwith your java files. Put content like
click=Click Me !!!
#where click is the key and Click Me !!! is the actual value that needs to be displayed
2) Add in faces-config.xml like this ::
<application>
<message-bundle>mymessages.mymessages</message-bundle>
</application>
3) Use in your jsp page like this ::
<f:view>
<f:loadBundle basename="mymessages/mymessages" var="msg"/>
hello :: <h:commandButton value="#{msg.click}" onclick="callJavaMethod()"></h:commandButton>
</f:view>
Similar Messages
-
How to configure resource bundle in facescontext.xml in JSF
I have to take each label from the resource bundle in my web application, so how to configure resource bundle in JSF and how to use it, so please help me.....
Follow the below mentioned steps ::
1) make a properties file say mymessages.properties alongwith your java files. Put content like
click=Click Me !!!
#where click is the key and Click Me !!! is the actual value that needs to be displayed
2) Add in faces-config.xml like this ::
<application>
<message-bundle>mymessages.mymessages</message-bundle>
</application>
3) Use in your jsp page like this ::
<f:view>
<f:loadBundle basename="mymessages/mymessages" var="msg"/>
hello :: <h:commandButton value="#{msg.click}" onclick="callJavaMethod()"></h:commandButton>
</f:view> -
How to use resource bundles?
I have a requirement to translate the test that appears on the custom buttons of my portal application. I know resource bundles are part of .properties file that are delivered in Classes floder. But i am not sure how should i make use of this in translating the button text. It would be grate if someone knows it. I will be very helpfull.
Regards,
AmeyaHi Ameya,
[This link|http://help.sap.com/saphelp_nw04/helpdata/en/74/641640b7b6dd5fe10000000a155106/frameset.htm] will provide you information on how to implement Portal Content Translation.
[This link|http://help.sap.com/saphelp_nw04/helpdata/en/62/8b1d40bb37e569e10000000a155106/frameset.htm] will explain how to create and access Resource Bundles (read the entire chapter).
Hope it helps,
Roy
Edited by: Roy Cohen on Nov 26, 2008 3:21 PM -
How to use resource bundle entries for column names/title in .rpt file
<p>Our application needs to be able to support reporting in multiple languages. Hence we do not want to put language specifiec column names in the rpt file but rather use text for a particular locale during runtime which in java world is easily achievable using Resource Bundle entries.</p><p>Does JRC allow for using resource bundle entries as column names or for that matter for titles etc. in the .rpt file?</p>
Hi,
You can follow this step-by-step tutorial to find out how to achieve this using our User Function Libraries (UFLs). The walkthrough can be found here:
<a href="http://diamond.businessobjects.com/node/412">http://diamond.businessobjects.com/node/412</a>
Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a> -
How To Change Resource Bundle file's data from Java Class
Hi
i have used below code for accessing Resource Bndle from Java Class but here i also want to make change in a particular key and its value.
please let me know the code i should use to make changes in Resource Bundle file's key and value and saving the same in the file.
package test; import java.util.Enumeration;
import java.util.ResourceBundle;
public class ResourceBundleTest {
public static void main(String[] args) {
ResourceBundle rb = ResourceBundle.getBundle("test.bundletest.mybundle");
Enumeration <String> keys = rb.getKeys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
String value = rb.getString(key);
System.out.println(key + ": " + value);
ThanksWith further debugging, I noticed the following line only works in integrated WLS but not in standalone WLS
resourceBundle = ResourceBundle.getBundle("com.myapp.MyMappings");
I confirmed the corresponding properties file was included properly in the EAR file but the standalone WLS failed to find the properties file at runtime.
Why did the standalone WLS class loader (must be the same as the integrated WLS) failed to find the properties file deployed under the WEB-INF/classes path in the EAR file?
The above line was in a POJO class which has the same classpath as the properties file ie. com.myapp.MappingManager.class.
It was strange that the class loader could load the POJO class but unable to find the com.myapp.MyMappings.properties in the same classpath!!!
Is this a bug in standalone WLS?
Edited by: Pricilla on May 26, 2010 8:52 AM
Edited by: Pricilla on May 26, 2010 9:01 AM -
OIM: How to implement resource admin views
Hi,
Is it possible to show only those resources on user that are managed by the admin? I have different admin groups managing a user's organization and depending upon what admin logs in to manage the user, only a subset of the user's resources should be shown and not the whole set. Only the SYS ADMIN should see all of them. Is it possible to modify the resources displayed in this way?
ThanksHi Sunny,
We have a similar requirement to show ADMIN OF A RESOURCE ONLY THOSE INSTANCES OF THAT RESOURCE which he is a admin of.
As you suggested, that UI customization is the only way to achieve this, any pointers on which jsp or any example on how to achieve this.
Regards -
How to organize resource bundle
Hi, I put all the properties file under WEB-INF/classes in wpl81. In i18n:localize tag I have bundleName="WEB-INF/classes/<bundle file>". During upgrade it's imported to /src directory. I saw some posting said to put under /WebContent. Or I should still keep them in /WEB-INF/classes? Which is the right place? Thanks!
I ran into the same problem a few months ago and never found RaymondDeCampo's solution. Thank you RaymondDeCampo. In the end I just started to use the '_' character instead of the '.' character. I think I prefer this method.
The example you gave would then become:
<h:outputText value="#{bundle.index_welcomeMessage}" />I feel like this solution looks a bit cleaner. -
Resource Bundle loading in Java
Hi,
I want to know how to load resource bundle in java? I have a requirement of reading xml files by looking the path in resource bundle.
Any help would be highly appreciated.FacesContext context = FacesContext.getCurrentInstance();
ResourceBundle bundle = ResourceBundle.getBundle(properties_file);
bundle.getString(properties_name); -
Hi,
I have written and deployed a portlet.
which works very fine with the default language (english)
I want to make the same portlet available in multiple languages, rather I want to provide internationalization over this.
I have prepared a resource bundle to tackle the scene.
I have few questions based on this -
1. Where do I put this resource bundle file
2. Will the portal server be able to pick the title of the portlet from the resource bundle.
Any pointers to this will be highly appreciated.
Thanks,
AbhiPlease check portal developer doc http://docs.sun.com/app/docs/doc/817-7695 from p.83 to 85
How to add resource bundle into portlet war file and deploy. Jerry -
How to link the resource bundle in JSF implemented in eclipse?
Kindly help me out
This is how I called the resource bundle in JSF
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<f:view>
<f:loadBundle basename="constantsUIProp" var="prop"/>
<h:form>
<h:inputText maxlength="#{prop.AREA_CODE_MAX}"></h:inputText>
</h:form>
</f:view>
</body>
</html>
when i tend to build, it shows an error like+ Resource bundle cannot be found on the classpath+
I have saved the resource bundle in WebContent/Web-Inf/classes/constantsUIProp -
How to compare and edit Resource bundle file using java programe
Hi All
I have two resource bundle with key, value and some comments. I need to write a java code to compare both of the values of the keys and if the values are different then i want to replace the second value with the first value.
Its a programe which will udpate the second file with the first file values.
I tried using Properties class but it didnt worked because when i am saving the file using store method it removes all the comments and the order of text also got disturbed.
How I need to do this any help appriciated.
Please elt me know if someone needs more info.
Thanks in advance.Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;
public class Test {
private static Properties props;
public static void main(String[] args) throws IOException {
File file = new File("test.ini");//This is out ini file
props = new Properties();//Create the properties object
read(file);//Read the ini file
//Once we've populated the Properties object. set/add a property using the setProperty() method.
props.setProperty("testing", "value");
write(file);//Write to ini file
public static void read(File file) throws IOException {
FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
props.load(fis);//load the ini to the Properties file
fis.close();//close
public static void write(File file) throws IOException {
FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
props.store(fos, "");//write the Properties object values to our ini file
fos.close();//close
} -
How to deal with resource bundle in multiple applications system
Hi all,
I'm building new system depend on the method of
one common model with multiple applications for the view objects
my JDeveloper version 11.1.2.3
my Question
How can i merge the resource bundle for these applications
as in the common model exists file for resouce bundle
and each other applications contains resource bundle files how can i merge all these file in one Resource bundle file ?
Edited by: 985756 on Apr 2, 2013 12:39 AMHi,
Please check anerjusb blog for your answer
Hoping this will help you.
http://andrejusb.blogspot.in/2009/12/reusing-resource-bundles-from-different.html
Thanks & Regards,
Vikas -
How to use a resource bundle in viewcontroller project
How can I create a resource bundle for a viewcontroller project ? Is there any way to add entries to it other than adding manually editing the property file ? so that all the key generated will be unique? How to access a message in the resource bundle in my backing bean so that I can display it in my screen ?
Thanks
SuneeshSuneesh Raman wrote:
How to access a message in the resource bundle in my backing bean so that I can display it in my screen ?Take a look at this: http://adfcodebits.blogspot.com/2010/04/bit-5-accessing-resource-bundle-from.html -
How to merge two resource bundle values ?
Hi All,
JDev ver : 11.1.1.7
I want to merge two resource bundle values.. How to do it ?
like this #{expr ? str1 : str1 + str2}
I tried like the one below and used some jstl fuctions... but no use not worked.. got some parse exception, compilation exception,etc..
<af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_WELC'] : resource['LBL_WELC'] + resource['LBL_HOME'] }"/>
Let me know how to do this ?
Regards,
GopiThe above outputtext is an example, I may use diff bundle keys like below,
<af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_TEST'] : resource['LBL_KEY1'] + resource['LBL_KEY2'] }"/>
The principle is the same
<af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_TEST'] : '' }#{ row.accountName eq 'AccountName9' ? '' : resource['LBL_KEY1'] }#{ row.accountName eq 'AccountName9' ? '' : resource['LBL_KEY2'] }"/>
Dario -
How to share a resource bundle throughout the faces application
adf faces 11g release 1
I want to implement the resource bundle as a java class extending the ListResourceBundle . That works fine for the local project.
I then made one global "resource project" that should be shared in all projects. I tried first deploying the project to a adflib jar file,
but i found that the resource class was not included ! I then deployed to a ordinary jar file and that works fine.
My question is : Is that the way to make a shared resource bundle ?
Regards,
JanHi.
Check following
http://andrejusb.blogspot.com/2009/12/reusing-resource-bundles-from-different.html
Maybe you are looking for
-
Typo; should be "how do I restore the Organize Bookmarks... selection". This selection also does not exist when I manually change Firefox to show the new "Firefox" orange menu tab at the upper left corner of the Firefox window.
-
Soundblaster Audigy and Windows
I've just installed Windows XP on a new hard dri've. I'm running an older computer with a 700mhz Celeron processor with an Audigy soundcard. On Windows ME it worked fine, but since upgrading, sounds work fine, but when I try playing music of any kind
-
Peculiar behavior of 3D graph grid lines
I am quite familiar with the 3D graph utilities in LabVIEW, but I recently discovered some strange behavior of the grid lines that I don't understand. See attachment. There are vertical gap/distortion features in the grid that appear to be errors in
-
Songs Are Grey In "Phase" - Solution
Just in case you are going to post a question related to Phase, and the songs in your playlist appear grey and unselectable while in the game. This only applies to your situation if: - Your Phase Playlist has synced - You can see all your songs in th
-
SS9 CC5.6 compiler bug - algorithm count confused with struct member
Found some code that fails to compile in CC 5.6 CC: Sun C++ 5.6 2004/07/15 #include <algorithm> using namespace std; struct A { int count; struct B struct A *a; int main(int argc, char **argv) struct B *b = 0; // This line fails to build,