Examples of Locale


Examples of ch.qos.cal10n.Locale

      return "";
    }

    String defaultCharset = localeData.defaultCharset();

    Locale la = findLocaleAnnotation(juLocale, localeData);
    String localeCharset = null;
    if (la != null) {
      localeCharset = la.charset();
    }
    if (!isEmptyString(localeCharset)) {
      return localeCharset;
    }
View Full Code Here

Examples of com.pugh.sockso.resources.Locale

     */

    private void serveResource( final String path ) throws IOException, BadRequestException {

        DataInputStream in = null;
        final Locale locale = getLocale();

        // only gzip for certain file types
        final String ext = Utils.getExt( path ).toLowerCase();
        for ( final String gzipExt : new String[] { "css", "js" } )
            if ( gzipExt.equals(ext) )
                getResponse().enableGzip();

        try {
           
            in = new DataInputStream( r.getResourceAsStream(path) );
           
            sendHeaders( path );
            getResponse().sendData( in );
           
        }

        catch ( final FileNotFoundException e ) {
            throw new BadRequestException( locale.getString("www.error.fileNotFound"), 404 );
        }
       
        finally {
            Utils.close( in );
        }
View Full Code Here

Examples of com.sun.star.lang.Locale

                                throws IllegalArgumentException {
            return new String[] { "getConversion" };
        }

        public com.sun.star.lang.Locale getLocale() {
            return new Locale("de", "DE", "");
        }
View Full Code Here

Examples of com.xith3d.scenegraph.Locale

   * Main function to test navigation
   * @param args
   */
  public static void main(String[] args) {
    VirtualUniverse universe = new VirtualUniverse();
    Locale locale = new Locale();
    universe.addLocale(locale);

    BranchGroup objRoot = new BranchGroup();

    Appearance a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    Shape3D sph = new Shape3D(TestUtils.createSphere(1.0f, 20), a);
    TransformGroup sphereTrans = new TransformGroup();
    sphereTrans.addChild(sph);

    objRoot.addChild(sphereTrans);

    AmbientLight aLgt = new AmbientLight(new Color3f(0.2f, 0.2f, 0.2f));
    objRoot.addChild(aLgt);

    locale.addBranchGraph(objRoot);
   
   
    PluginManager pluginManager = (PluginManager) new Java3DPluginManager();
    
   
View Full Code Here

Examples of java.util.Locale

    ActionWithLocale action = new ActionWithLocale();

    c.readAnnotations(action.getClass());
    Map<String, InjectionWrapper> inputs = c.getInjectionMap();

    Locale locale = Locale.getDefault();
   
    HttpServletRequest request = createMock(HttpServletRequest.class);
    expect(request.getAttribute(Globals.LOCALE_KEY)).andReturn(locale);
   
    replay(request);
View Full Code Here

Examples of java.util.Locale

  @Test
  public void testResolveLocale()
  {
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
    StrecksLocaleResolver resolver = new StrecksLocaleResolver();
    Locale locale = Locale.getDefault();
   
    expect(request.getAttribute(Globals.LOCALE_KEY)).andReturn(locale);
    replay(request);
    assert locale == resolver.resolveLocale(request);
   
View Full Code Here

Examples of java.util.Locale

  /**
   * Returns the list of available categories in furniture library in the given language.
   */
  public List<FurnitureCategory> getDefaultCategories(String language) {
    Locale locale;
    int underscoreIndex = language.indexOf('_');
    if (underscoreIndex != -1) {
      locale = new Locale(language.substring(0, underscoreIndex), language.substring(underscoreIndex + 1));
    } else {
      locale = new Locale(language.length() == 0
          ? this.preferences.getFurnitureDefaultLanguage()
          : language);
    }
    ResourceBundle resource = ResourceBundle.getBundle(
        "com.eteks.furniturelibraryeditor.viewcontroller.DefaultCategories", locale);
View Full Code Here

Examples of java.util.Locale

                  }



         case 2 : String country = ch.getCountry();
                  Locale locale = new Locale(Locale.getDefault().getLanguage(), country);
                  return locale.getDisplayCountry();
         case 3 : return ch.getTimeZone().getDisplayName();
         default: return ch;
       }
     }
View Full Code Here

Examples of java.util.Locale

    mCountryCB.removeAllItems();
    mCountryCB.addItem(new FilterItem(mLocalizer.msg("allCountries",
        "All Countries"), null));
    ArrayList<FilterItem> items = new ArrayList<FilterItem>(countries.size());
    for (String country : countries) {
      Locale locale = new Locale(Locale.getDefault().getLanguage(), country);
      items.add(new FilterItem(locale.getDisplayCountry(), country));
    }
    Collections.sort(items);

    String defaultCountry = Settings.propSelectedChannelCountry.getString();
    for (FilterItem item : items) {
View Full Code Here

Examples of java.util.Locale

        String line = null;
        try {
            FTPFileFactory ff = new FTPFileFactory(parser);
            if (locale != null) {
                System.out.println("Setting locale to " + locale);
                Locale l = new Locale(locale);
                Locale[] locales = new Locale[2];
                locales[0] = l;
                locales[1] = Locale.ENGLISH;
                ff.setLocales(locales);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.