How to get the location of the browser?(pt_BR, en_US, es_ES...)

How to get the location of the browser?
example: pt_BR, en_US, es_ES...

Hi Eduardo Cordeiro,
Sorry in reaching you late...I was out on a trip...
You need to put the javascript in your Flex application html wrapper file ...in which your  Flex application SWF is embedded.
Write the Javascript function in your html file as below :
function getBrowserLanguage()
  var browserLanguage = navigator.browserLanguage;
  return browserLanguage;
//In your mxml File you can access the JavaScript function in your MXML as below:
var browserLang:String  = ExternalInterface.call('getBrowserType');
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari

Similar Messages

  • How do I get the browser to allow Office programs to open files?

    I have created a .JSP/servlet index of documents on a server. Basically, the JSP displays a list of all the documents in a directory with a summary of each and a link out to the right...like this:
    <b>reference document<b> open
    Word documents and PDF files open fine b/c they open in the new browser window, however, most other documents such as .XLS, .ZIP, and .PPT all return gibberish to the browser window. Obviously, I would prefer that the browser allow the associated program on the user's PC to open the file but I have no idea how to do that effectively...especially since I am dealing with a variety of filetypes??
    Can someone tell me what the best way would be to manage this problem given that it could be any number of file types??
    any help is greatly appreciated!
    Thanks,
    Chuck

    I have gotten closer...I can get the application to open with the below code using response.setHeader() as follows but the file is not opened:
    <%
    String filename = request.getParameter("filename");
    out.print(filename);
    String format = ".PPT";
    if ((format != null) && (format.equals(".PPT"))) {
    response.setHeader("Content-Type","application/ms-powerpoint");
    response.setHeader("Content-Disposition", "attachment;");
    response.setHeader("Content-Disposition", "filename=".concat("test.ppt"));
    %>
    So, I am close...I was hoping someone could explain how to get the file to open in the application...right now all that happens is the app. opens but no content is diplayed.
    Do I also have to do something like FileOutputStream with the file? can somebody possibly provide an example?
    thanks again,
    Chuck

  • How to get the extension Info from firefox? Do we have any firefox API to communicate with the browser? I couldnt see the HTML of the widget displayed in the toolbar how to access the widget using JS or any way

    How to get the extension Info from firefox? Do we have any firefox API to communicate with the browser? I couldnt see the HTML of the widget displayed in the toolbar how to access the widget using JS or any way

    Hi,
    Thanks for the suggestion. I've been playing around with some of the classes of the java.net package and java.io
    Using the URL class i can get the content of the data from a STATIC page and output that response to file so that is does not display to the client broswer.
    But this only works if the URL i give points to a static html page.
    So the problem i'm getting is if i'm righting in arguments in the URL, this means that server needs to process the arguments i give and its sends back a dynamic result. Because its dynamic the URL class can not handle this and throws me an exception everytime :(
    Have u ever tried to do some things like this?
    Rahul

  • My Windows 7 gadgets are on top of the browser since I've upgraded to Firefox 4. How do I get the browser on top?

    My Windows 7 gadgets are on top of the browser since I've upgraded to Firefox 4. How do I get the browser on top?

    Glad to have helped.

  • My iPhone getting stolen,how I get the actual location my iPhone way using the apps find my iPhone?

    My iPhone getting stolen,how I get the actual location the full address to find my iPhone way using the apps find my iPhone?

    If you set up the Find My iPhone service prior to your iPhone going missing - the app is for tracking a device from another iOS device - then there is a chance that can be tracked, though it depends on a number of factors (the iPhone is turned on, connected to either the 3G or a WiFi network, or has not had the Find My iPhone service disabled or the iPhone been completely restored). Log into icloud.com and go to the Find My iPhone section. If you did not set up Find My iPhone, check with your cell carrier. Some carriers offer their own tracking service, though you usually have to pay for it. 
    If your carrier does not offer such a service and you did not set up Find My iPhone, then there is no way to track the unit. Contact the police and change any passwords for any online accounts you may have used from your iPhone (the iTunes Store, for instance). 
    Regards.

  • In iphoto how to get the gold you delete a photo warning message when you check the box not ask

    in iphoto how to get the gold you delete a photo warning message when you check the box not ask

    Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder.
    (On 10.7 or later: Hold the option (or alt) key while clicking on the Go menu in Finder to access the User Library)
    (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    What's the plist file?
    For new users: Every application on your Mac has an accompanying plist file. It records certain User choices. For instance, in your favourite Word Processor it remembers your choice of Default Font, on your Web Browser is remembers things like your choice of Home Page. It even recalls what windows you had open last if your app allows you to pick up from where you left off last. The iPhoto plist file remembers things like the location of the Library, your choice of background colour, whether you are running a Referenced or Managed Library, what preferences you have for autosplitting events and so on. Trashing the plist file forces the app to generate a new one on the next launch, and this restores things to the Factory Defaults. Hence, if you've changed any of these things you'll need to reset them. If you haven't, then no bother. Trashing the plist file is Mac troubleshooting 101.

  • How to get the most of PowerBook G3 233Mhz

    its been a while since I dint post on Apple discussions, about one year ago, I was thinking I would get a PowerBook G3 Pismo, one year later evry thing was diffrent, I ordered a 233Mhz PowerBook G3 Wallstreet (It was the only choice with the money I had) and now I really want to know how to get the most out of it.
    I want to do the following
    -Browse the web
    -Listen to music
    -do keynote presentations
    -word proccesing
    -storage
    The powerBook that I am going to get comes with a nice 233Mhz G3 chip, 64MB of RAM a 12 inch screen and running Mac OS 9.2.2 (my favorite).
    I have alot of knowledge on old Macintosh, and I know almost anything if some asks me things about acient macintosh, but you know, some times you need a little help from other mac fans and share your thoughts...
    So what apps should I get? I do know that if you use the commom low requirements apps, It will run smoothly.

    iBook,
    Yes, you can add a USB 1.1 or 2.0 PC card to the PCMCIA/CardBus slot. A few suggestions:
    -Combo FireWire/USB CardBus PC cards do not work well with OS 9.x; either the USB or FireWire port does not work. This is a software problem in 9.x since these combos work fine under 10.x. My suggestion would be to buy a separate USB PC card and/or FireWire PC card for your connectivity.
    -USB 2.0 PC cards will only run at the slower USB 1.1 speeds under 9.x but this is fine for printers, etc. If you wanted to connect an HD, I would use the FireWire interface.
    -FireWire and USB PC cards supply insufficient bus power to power a FireWire or USB HD; any device like a printer or HD will have or should have its own power supply.
    -Since FireWire and USB are not native to the Wallstreet, the necessary USB and FireWire extensions have not been installed. Open your Extensions Mananger and see if you have these extensions:
    USB Mass Storage Extension
    USB Support
    USB Mass Storage Support
    USB Software Locator
    USB Device Extension
    If the above are not present, I recommend you download this USB extension package from OWC; they assembled various version numbers of the Apple USB extensions to correct a problem OS 9.2.2 has with USB PC cards but they can be used with any version of OS 8.6 > 9.2.2.
    http://eshop.macsales.com/tech/ftp/usb/usbextensions.sit
    A file titled 'usbextensions.sit' will appear on your desktop assuming you have set the browser to download files to your desktop. Double-click the file to decompress it and you will have a folder on the desktop with these extensions:
    USB Support v1.4.1
    USB Software Locator v1.5.6
    USB Device Extension v1.5.6
    USB Mass Storage Support v2.0.4
    USB Mass Storage Extension v2.0.4
    Highlight all five extensions, then drag them on top of the closed System Folder icon; they will be automatically installed in the Extensions folder. Before restarting, go to Apple menu > Control Panels > Energy Saver > Advanced Settings and uncheck 'Allow Processor Cycling' for •BOTH• the power adapter and battery. If not unchecked (disabled), the powerbook will freeze with a USB PC card.
    Now restart to make the USB extensions active. Insert the USB PC card; you should see a USB PC card icon on the desktop. Connect a USB mouse (there is sufficient power for it) and test the USB PC card.
    If no desktop USB PC card icon appears, make sure the PC card is fully inserted. You may have to place a hand on the side of the powerbook opposite the PC card slot so you can push hard. If the card fails to seat, the card slot may be in the locked position. Push an opened paperclip into the small hole next to the slot to unlock, then try the card again.
    http://docs.info.apple.com/article.html?artnum=16167

  • How to get the UserTransaction object in  stateless session bean

    Hi, I am using jboss server and jdk5 version and using EJB.
    My Application flow :
    JSP à Action(Struts) à Service Locator à Session bean à Entity Bean(cmp) à DB.
    I tried to get the UserTransaction object in my Action. Its my code.
    InitialContext ctx = new InitialContext();
    UserTransaction uTrans = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
    After used uTrans.begin(),uTrans.commit() and uTrans. rollback () also.
    Its working fine .
    But, I used the the same code inside in my session bean its not working.
    Stateless Session Manager Bean code :
    public class SampleManagerBean implements SessionBean {
    public void ejbCreate() throws CreateException {  }
    public void ejbRemove() {  }
    public void ejbActivate() {   }
    public void ejbPassivate() {   }
    public void setSessionContext(SessionContext sessionContext) {
    this.sessionContext = sessionContext;
         public void createSample() throws EJBException
         try{
                   InitialContext ctx = new InitialContext();
                   UserTransaction ut = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
              }catch(Exception e) {
              System.out.println(“ Exception === > “+e)
    Its throws the error ie: javax.naming.NameNotFoundException: UserTransaction not bound
    How to get the UserTransaction object in my session bean. Kindly give solution the above errors.
    - Thendral

    first of all, you could just use sessionContext.getUserTransaction(). however, that would only work if your bean is using bean-managed transactions. the default is container-managed transaction, in which case you cannot get a UserTransaction object. if you want to manage transactions, you need to add the TransactionManagementType.BEAN annotation to your ejb.

  • Question: how to get the adobe plug in to play a downloaded flv file ?

    I want to know how to get the flv adobe plug in which i downloaded as a result abc or nbc or cbs.com i forget exactly which said i had to and also it seems to be used for playing most all videos from web such as those from utube,hulu, etc. So my question is how do i get the plug in to play any downloaded *.flv video ?  The particulars on the one i have is:
    Output folder: C:\WINDOWS\system32\Macromed\Flash
    Execute: "C:\WINDOWS\system32\Macromed\Flash\uninstall_plugin.exe"
    Extract: NPSWF32.dll
    Extract: NPSWF32_FlashUtil.exe
    Extract: flashplayer.xpt
    also perhaps FLVPlayer.swf of about 9Kb may have something to do with it?
    And the latest update i have was about jan 13 when it seemed to automatically take over my system and update itself.x
    I know it has the ability to do what i want- which is full screen cropped ,change aspect ratios etc. and seems
    It has to be able to or else it could not play the files and give those options which it does on some videos like from utube etc. in the first place. Unfortuneately it has something also to do with the useless *.swf files which are apparently of no use to anything and could certainly be eliminated .
      I have downloaded several freebie flv players such as bs player etc. etc. but they all have so many faults and are not suitable. Bs player does what i want but it hangs , have to go to system mgr. to get out of it sometimes , often difficult to use etc.etc. The main features is i need is to be able to make and play playlists to automatically in full screen one after the other in a specified order with NO user intervention and the ability to magnify or 'pan in' i guess they call it and change aspect ratios so that i can have full screen as if just cropping part of horizontal such as if want to view a 16/9 aspect ratio on a computer as i have with the prior standard 4/3 aspect and change a downloaded vertically stretched to a cropped instead etc.
        Also it doesn't make sense to download others and take up disk space when already have the adobe - also adobe seems to be the only one that plays hulu flv's correctly - on other flv players the video and audio are way out of sync and not just by few seconds but often by a minute or more. I know there is another 'pain' way to do it which is create a *.avi or other extension with loss of clarity etc. which have done but would like to be able to just do it in real time while playing the flv file itself as for example
    as bs player does.
       Anyway if there is no way to get adobe to do this does anyone know of any other free flv player downloads which will do what
    i want - basically playlists, magnify , pan,crop and still full screen, change aspect ratios -  other than bs player ?

    The plugin is what it is: a browser plugin - it cannot act as a standalone player.
    To play local flv files you either need to
    download/install the standalone player (Projector) from http://www.adobe.com/support/flashplayer/downloads.html
    download/install Adobe Media Player http://www.adobe.com/products/mediaplayer/

  • How to get the Delivery address for PO

    I have a problem.
    I am working on a SAP Script , which is for PO(Zmedruck_po) , which is a copy of
    MEDRUCK.
    I am asked to print the delivery adress in a window .
    The scenario is like this .
    In ME23N , under item details , there is a tab called DELIVERY ADDRESS
    this has option to enter the adress details or a delivery number in the  address text box .
    If the address number is present i have to print that address , else i have to print the address which is entered in the delivery address tab.
    If the delivey address number is there i have no problem in printing it ,But if address number is not there ,I need to know how to get the delivery address,
    is it the plant address, company code address ... ?
    I debuged ,but could not find out.
    Can anyone help please .

    Hi,
    try using the below method:
    Goto TWLAD table with storage location (EKPO-LGORT) as key to get address number (ADDRNUMBER).  then goto ADRC table to get the address of the delivery
    Regards
    Shiva

  • How to get the absolute path of logicalhost server domain on Windows Sun

    i am reading a file from Xsql Folder, that is located in the logicalhost Sun\AppServer\domains\domain1\applications\j2ee-apps.(IN Sun Application Server)
    I am pretty sure that using the absolute path will solve this issue, so my first question is: How to get the absolute path of logicalhost server domain on Windows?
    i tried with System.getProperty("com.sun.aas.instanceRoot").
    but i am able to retrive Sun\AppServer\domains\domain1 upto this .i am unable to retrive Sun\AppServer\domains\domain1\applications\j2ee-apps.
    please suggest me how u can get absolute path in sun application server

    Take a look here

  • How to get the absolute path of logicalhost server domain on Windows?

    My logicalhost server domain behaves strangely. I am reading a file from collaboration definiton, that is located in the logicalhost/is/domains/domain1/config folder. I thought, that this folder is used as an application root folder so I can read files like ./file from there. And it worked.
    But then I've installed the domain as a Windows service, restarted the PC. When the domain1 gets started, I get exceptions saying that the file can't be found. Then I restart the domain (in domainmgr.bat) and it works again.
    I am pretty sure that using the absolute path will solve this issue, so my first question is: How to get the absolute path of logicalhost server domain on Windows?
    And my second question is: Why does this happen?

    The default folder for a Windows Service is the system32 folder contrary to the instance root folder when starting it as a normal process.
    That's the why, haven't tried the how, but you should be able to get the value by calling System.getProperty("com.sun.aas.instanceRoot").
    Hope this helps
    Paul

  • How to get the UDDI Key to publish a service provider system in SR?

    Hi,
    I am following instruction in appendix 1 & 2 of the white paper at https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1079b1af-dcb7-2b10-9ebb-eafcaa3cbbea?overridelayout=true
    trying to publish a service provider system into the service registry. One thing not clear to me is how to get the uddikey as needed in step 6 in appendix 1.
    My service registry is in a PI 7.1 SP4 system. I followed the instruction in appendix 2 but there is no uddi key displayed in the General tab. Please help.
    Regards,
    Jiannan
    Paragraph extracted from the whitepaper:
    There may be cases in which the NWA logical settings do not match the Services Repository
    settings when Visual Composer is trying to locate the enterprise services. Such cases can occur
    when there is no SLD ID definition of the physical system in the Services Repository.
    Currently, Visual Composer cannot search for services on a physical system with an empty SLD ID
    (which is not a valid one).
    To obtain this capability, the following steps should be performed to generate the necessary data
    for each system with a non-valid SLD ID, so that Visual Composer can search for services over it.
    1.Log on to http://<serverName>:<serverPort>/WSNavigator.
    2.Select the Services Registry radio button.
    3.In the Find field, enter sr and choose Go.
    4.Select the ServicesRegistrySi line and choose Next.
    5.Under the Operation Name, search for the publishPhysicalSystems operation, select it and choose Next.
    6.Fill the service information parameters with the following (see Appendix 2 for details on how to get this information) :
      6.1.Click the + icon in the physical system[].
      6.2.Deselect the Classifications checkbox.
      6.3.Click the + icon in the classificationReferenceGroups[].
      6.4.Click the + icon in the classificationReferences[].
      6.5.Deselect the classificationSystemKey checkbox.
      6.6.Deselect the uddiKey checkbox and enter the value <localUddiKey>.
      6.7.Deselect the value checkbox and enter the value <localSystemHostName>.
      6.8.Deselect the host checkbox and enter the value <localHostName>.
      6.9.Deselect the physicalSystemKey checkbox.
      6.10.Deselect the logical key checkbox and enter the value <System name>.<SystemHome>.<host name>.
      6.11.Deselect the systemName checkbox and enter the value <system name>.
      6.12.Deselect the type checkbox and enter the value 2.

    Hi Jiannan,
    No worries, you can go to UDDI client from the main page of PI  i.e. http://<serverName>:<serverPort>/
    And you use the search function for  the TModel for your Physical System. Search parameters can use the % wildcard.
    Hit the search and you find the UDDI Key for the Physical System.
    Cheers.
    Hemant Chahal

  • How to get the current page URL

    HI All
    I am working in oracle apps 4.0
    I have one page called history in that i have one page item called Application url. My application id is 122 but its a copy of application 106
    How to get the current page url for the page item.
    Any steps should be help ful
    Thanks & Regards
    Srikkanth.M

    I'm not 100% clear on what the requirement is from the description, however it does sound like you are making things unnecessarily complicated.
    If you want permanent/ID-independent links then use application and page aliases.
    so here we used to display the url like this: <tt>{noformat}http://81.131.254.171:8080/apex/f?p=122{noformat}</tt>
    Do you mean that the URL is displayed like that? If so that doesn't seem particularly helpful. How is anyone supposed to know what it is?
    There are many ways to provide links in APEX&mdash;including lists and nav bars.
    Where the link is to another resource located on the same server (such as another page in the same app, or a different app in the workspace), relative addressing can be used, making it unecessary to include scheme, domain and port information in the URL. For example, if the page to be linked to has a page alias <tt>ABOUT</tt> in an application with alias <tt>UNITY</tt>, and the apps share an authentication scheme/cookie to permit shared sessions, then the link URL is simply
    f?p=UNITY:ABOUT:&APP_SESSION.

  • How to get the pull path name from a file upload window

    Hello everyone!
    I have encountered the following problem with the following JSP code:
    <form method="post" action="filename.jsp">
    Upload JAVA program:
    <input type=file size=20 name="fname" accept="java">
    <input type=submit value="go">
    </form>
    <%
    String s = "";
    if (request.getParameter("fname") != null)
    s = request.getParameter("fname")
    %>
    The value of s is alway the filename. However I want to get the full path in addition to the filename, so that I can read the file. Does anyone know how to get the pull name of the file?
    thanks a lot in advance,

    Dear Sir,
    thanks a lot for your reply. Please let me explain what I intended to do: I want to upload a file from the local machine and then read the content of the file. Therefore I need to the fullpath of the filename like /var/local/file.java instead of file.java. The latter is what I got.
    The problem I have with your code is that the function like "request.getServerScheme()" is not recognized. Maybe is it because I didn't install servelet package? I only installed javax package btw. Also my application runns on Tomcat server if this could give you some information. The error message I had is as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:133: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    url = request.getServerScheme()
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:136: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    + ((("http".equals(request.getServerScheme()) && request.getServerPort() != 80)
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:137: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    ||("https".equals(request.getServerScheme()) && request.getServerPort() != 443))
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:139: cannot resolve symbol
    symbol : method getServletConfig ()
    location: interface javax.servlet.http.HttpServletRequest
    + "/" + request.getServletConfig().getServletName()
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:140: cannot resolve symbol
    symbol : variable path
    location: class org.apache.jsp.addExercise_jsp
    + "/" + path
    ^
    5 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

Maybe you are looking for