Search Results

Search found 1033 results on 42 pages for 'locale'.

Page 10/42 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • [NSLocale currentLocale] always returns "en_US" not user's current language

    - by Prairiedogg
    I'm in the processes of internationalizing an iPhone app - I need to make programmatic changes to certain views based on what the user's current locale is. I'm going nuts because no matter what the language preference on the iPhone simulator or actual hardware are, locale always evaluates to "en_US": NSString *locale = [[NSLocale currentLocale] localeIdentifier]; NSLog(@"current locale: %@", locale); The crazy thing is that the rest of the application behaves as expected. The correct strings are selected from the Localization.strings file and used in the interface, and the correct .xib files for the selected locale are used. I have also tried the following, to no avail and with the same result: NSString *locale = [[NSLocale autoupdatingCurrentLocale] localeIdentifier]; NSLog(@"current locale: %@", locale); Is there something simple I'm missing? A preference or an import perhaps? Update: As Darren's answer suggests, the preference I'm looking for is not in NSLocale, rather it is here: NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSArray* languages = [defs objectForKey:@"AppleLanguages"]; NSString* preferredLang = [languages objectAtIndex:0]; NSLog(@"preferredLang: %@", preferredLang);

    Read the article

  • How to parse time stamps with Unicode characters in Java or Perl?

    - by ram
    I'm trying to make my code as generic as possible. I'm trying to parse install time of a product installation. I will have two files in the product, one that has time stamp I need to parse and other file tells the language of the installation. This is how I'm parsing the timestamp public class ts { public static void main (String[] args){ String installTime = "2009/11/26 \u4e0b\u5348 04:40:54"; //This timestamp I got from the first file. Those unicode charecters are some Chinese charecters...AM/PM I guess //Locale = new Locale();//don't set the language yet SimpleDateFormat df = (SimpleDateFormat)DateFormat.getDateTimeInstance(DateFormat.DEFAULT,DateFormat.DEFAULT); Date instTime = null; try { instTime = df.parse(installTime); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println(instTime.toString()); } } The output I get is Parsing Failed java.text.ParseException: Unparseable date: "2009/11/26 \u4e0b\u5348 04:40:54" at java.text.DateFormat.parse(Unknown Source) at ts.main(ts.java:39) Exception in thread "main" java.lang.NullPointerException at ts.main(ts.java:45) It throws exception and at the end when I print it, it shows some proper date... wrong though. I would really appreciate if you could clarify me on these doubts How to parse timestamps that have unicode characters if this is not the proper way? If parsing is failed, how could instTime able to hold some date, wrong though? I know its some chinese,Korean time stamps so I set the locale to zh and ko as follows.. even then same error comes again Locale = new Locale("ko"); Locale = new Locale("ja"); Locale = new Locale("zh"); How can I do the same thing in Perl? I can't use Date::Manip package; Is there any other way?

    Read the article

  • Managing the layout of a Java MainFrame of Canvas3d

    - by John N
    Hi, Im trying to organise the layout of four canvas3d objects in a single MainFrame. Iv tried using some layout managers but none are working (or im doing it wrong). Can anyone give me advice or point me to a way to get this to display the four canvas's as a grid of four? Thanks, John public class Main { public static void Main(){ Window win = new Window(); } } import javax.media.j3d.BranchGroup; import javax.media.j3d.Canvas3D; import javax.media.j3d.Locale; import javax.media.j3d.PhysicalBody; import javax.media.j3d.PhysicalEnvironment; import javax.media.j3d.Transform3D; import javax.media.j3d.TransformGroup; import javax.media.j3d.View; import javax.media.j3d.ViewPlatform; import javax.media.j3d.VirtualUniverse; import javax.vecmath.Vector3f; import com.sun.j3d.utils.picking.PickCanvas; public class Universe { boolean camera = true; Canvas3D canvas1, canvas2, canvas3, canvas4; VirtualUniverse universe; Locale locale; TransformGroup vpTrans1, vpTransRight, vpTransFront, vpTransPers; TransformGroup mouseTransform = null; View view1, view2, view3, view4; BranchGroup scene; PickCanvas pickCanvas1 = null; PickCanvas pickCanvas2 = null; PickCanvas pickCanvas3 = null; PickCanvas pickCanvas4 = null; BranchGroup obj = new BranchGroup(); // Create a BranchGroup node for the view platform BranchGroup vpRoot = new BranchGroup(); //Temp vars for cam movement public Universe(Canvas3D c1, Canvas3D c2, Canvas3D c3, Canvas3D c4, BranchGroup scene) { this.canvas1 = c1; this.canvas2 = c2; this.canvas3 = c3; this.canvas4 = c4; this.scene = scene; // Establish a virtual universe that has a single // hi-res Locale universe = new VirtualUniverse(); locale = new Locale(universe); // Create a PhysicalBody and PhysicalEnvironment object PhysicalBody body = new PhysicalBody(); PhysicalEnvironment environment = new PhysicalEnvironment(); // Create a View and attach the Canvas3D and the physical // body and environment to the view. view1 = new View(); view1.addCanvas3D(c1); view1.addCanvas3D(c2); view1.addCanvas3D(c3); view1.addCanvas3D(c4); view1.setPhysicalBody(body); view1.setPhysicalEnvironment(environment); // Create a BranchGroup node for the view platform BranchGroup vpRoot = new BranchGroup(); // Create a ViewPlatform object, and its associated // TransformGroup object, and attach it to the root of the // subgraph. Attach the view to the view platform. Transform3D t = new Transform3D(); t.set(new Vector3f(0.0f, 0.0f, 2.0f)); ViewPlatform vp = new ViewPlatform(); vpTrans1 = new TransformGroup(t); vpTrans1.addChild(vp); vpRoot.addChild(vpTrans1); vpRoot.addChild(scene); view1.attachViewPlatform(vp); // Attach the branch graph to the universe, via the // Locale. The scene graph is now live! locale.addBranchGraph(vpRoot); } } import javax.media.j3d.BranchGroup; import javax.media.j3d.Canvas3D; import javax.media.j3d.Locale; import javax.media.j3d.PhysicalBody; import javax.media.j3d.PhysicalEnvironment; import javax.media.j3d.Transform3D; import javax.media.j3d.TransformGroup; import javax.media.j3d.View; import javax.media.j3d.ViewPlatform; import javax.media.j3d.VirtualUniverse; import javax.vecmath.Vector3f; import com.sun.j3d.utils.picking.PickCanvas; public class Universe { boolean camera = true; Canvas3D canvas1, canvas2, canvas3, canvas4; VirtualUniverse universe; Locale locale; TransformGroup vpTrans1, vpTransRight, vpTransFront, vpTransPers; TransformGroup mouseTransform = null; View view1, view2, view3, view4; BranchGroup scene; PickCanvas pickCanvas1 = null; PickCanvas pickCanvas2 = null; PickCanvas pickCanvas3 = null; PickCanvas pickCanvas4 = null; BranchGroup obj = new BranchGroup(); // Create a BranchGroup node for the view platform BranchGroup vpRoot = new BranchGroup(); //Temp vars for cam movement public Universe(Canvas3D c1, Canvas3D c2, Canvas3D c3, Canvas3D c4, BranchGroup scene) { this.canvas1 = c1; this.canvas2 = c2; this.canvas3 = c3; this.canvas4 = c4; this.scene = scene; // Establish a virtual universe that has a single // hi-res Locale universe = new VirtualUniverse(); locale = new Locale(universe); // Create a PhysicalBody and PhysicalEnvironment object PhysicalBody body = new PhysicalBody(); PhysicalEnvironment environment = new PhysicalEnvironment(); // Create a View and attach the Canvas3D and the physical // body and environment to the view. view1 = new View(); view1.addCanvas3D(c1); view1.addCanvas3D(c2); view1.addCanvas3D(c3); view1.addCanvas3D(c4); view1.setPhysicalBody(body); view1.setPhysicalEnvironment(environment); // Create a BranchGroup node for the view platform BranchGroup vpRoot = new BranchGroup(); // Create a ViewPlatform object, and its associated // TransformGroup object, and attach it to the root of the // subgraph. Attach the view to the view platform. Transform3D t = new Transform3D(); t.set(new Vector3f(0.0f, 0.0f, 2.0f)); ViewPlatform vp = new ViewPlatform(); vpTrans1 = new TransformGroup(t); vpTrans1.addChild(vp); vpRoot.addChild(vpTrans1); vpRoot.addChild(scene); view1.attachViewPlatform(vp); // Attach the branch graph to the universe, via the // Locale. The scene graph is now live! locale.addBranchGraph(vpRoot); } }

    Read the article

  • meld on OS X 10.7 doesn't work?

    - by klm123
    I'm installing meld on Mac OS 10.7 using port. It has downloaded all dependencies and told that everything is ok: Staging meld into destroot Installing meld @1.5.3_0 Activating meld @1.5.3_0 Cleaning meld Updating database of binaries: 100.0% Scanning binaries for linking errors: 100.0% No broken files found. but when I run: [18:28:24]~$ meld Traceback (most recent call last): File "/opt/local/bin/meld", line 75, in <module> locale.setlocale(locale.LC_ALL,'') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 539, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting what is the problem and how to deal with it?

    Read the article

  • Linker errors between multiple projects in Visual C++

    - by rlbond
    Hi, I have a solution with multiple projects. I have a "main" project, which acts as a menu and from there, the user can access any of the other projects. On this main project, I get linker errors for every function called. How do I avoid these linker errors? I set the project dependencies already in the "Project Dependencies..." dialog. Thanks EDIT -- I did as suggested and added the output folder to the linker's additional directories. Now, however, I get a million errors as follows: 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ios ::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(int)" (?width@ios_base@std@@QAEHH@Z) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf ::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static bool __cdecl std::char_traits::eq_int_type(int const &,int const &)" (?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static int __cdecl std::char_traits::eof(void)" (?eof@?$char_traits@D@std@@SAHXZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf ::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_streambuf * __thiscall std::basic_ios ::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char __thiscall std::basic_ios ::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBEHXZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static unsigned int __cdecl std::char_traits::length(char const *)" (?length@?$char_traits@D@std@@SAIPBD@Z) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream & __thiscall std::basic_ostream ::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream * __thiscall std::basic_ios ::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ostream ::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf ::_Lock(void)" (?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf ::_Unlock(void)" (?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in panels.lib(panel_main.obj) 3msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in panels.lib(panel_main.obj) 3libcpmtd.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP90D.dll) 3libcpmtd.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP90D.dll) 3libcpmtd.lib(locale0.obj) : error LNK2005: "void __cdecl _AtModuleExit(void (__cdecl*)(void))" (?_AtModuleExit@@YAXP6AXXZ@Z) already defined in msvcprtd.lib(locale0_implib.obj) 3libcpmtd.lib(locale0.obj) : error LNK2005: __Fac_tidy already defined in msvcprtd.lib(locale0_implib.obj) 3libcpmtd.lib(locale0.obj) : error LNK2005: "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z) already defined in msvcprtd.lib(locale0_implib.obj) 3libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP90D.dll) 3libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP90D.dll) 3libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,class std::basic_string,class std::allocator const &)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z) already defined in msvcprtd.lib(MSVCP90D.dll) 3libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP90D.dll) 3libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprtd.lib(MSVCP90D.dll) 3libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP90D.dll)

    Read the article

  • Internationalization of static pages with Rails

    - by Gavin
    I feel like I'm missing something really simple and I keep spinning my wheels on this problem. I currently have internationalization working throughout my app. The translations work and the routes work perfectly. At least, most of the site works with the exception of the routes to my two static pages, my "About" and "FAQ" pages. Every other link throughout the app points to the proper localized route. For example if I select "french" as my language, links point to the appropriate "(/:locale)/controller(.:format)." However, despite the changes I make throughout the app my links for the "About" and "FAQ" refuse to point to "../fr/static/about" and always point to "/static/about." To make matters stranger, when I run rake routes I see: "GET (/:locale)/static/:permalink(.:format) pages#show {:locale=/en|fr/}" and when I manually type in "../fr/static/about" the page translates perfectly. My Routes file: devise_for :users scope "(:locale)", :locale => /en|fr/ do get 'static/:permalink', :controller => 'pages', :action => 'show' resources :places, only: [:index, :show, :destroy] resources :homes, only: [:index, :show] match '/:locale' => 'places#index' get '/'=>'places#index',:as=>"root" end My ApplicationController: before_filter :set_locale def set_locale I18n.locale=params[:locale]||I18n.default_locale end def default_url_options(options={}) logger.debug "default_url_options is passed options: #{options.inspect}\n" { :locale => I18n.locale } end and My Pages Controller: class PagesController < ApplicationController before_filter :validate_page PAGES = ['about_us', 'faq'] def show render params[:permalink] end def validate_page redirect_to :status => 404 unless PAGES.include?(params[:permalink]) end end I'd be very grateful for any help ... it's just been one of those days. Edit: Thanks to Terry for jogging me to include views. <div class="container-fluid nav-collapse"> <ul class="nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= t(:'navbar.about') %><b class="caret"></b></a> <ul class="dropdown-menu"> <li><%=link_to t(:'navbar.about_us'), "/static/about_us"%></li> <li><%=link_to t(:'navbar.faq'), "/static/faq"%></li> <li><%=link_to t(:'navbar.blog'), '#' %></li> </ul> </li>

    Read the article

  • How to load jqueryui from google CDN with locale different than english?

    - by WooYek
    I would like load a different than English language locale for jqueryui, while loading jqueryui form Google AJAX Libraries API CDN? Is there a way to pass I18n parameter into load function? google.load("jqueryui", "1.7.2") I have also tried as per jQueryUI documentation on date picker internationalization to pass: $(selector).datepicker($.datepicker.regional['pl']); ... but it did not do the trick :(

    Read the article

  • Rotation of viewplatform in Java3D

    - by user29163
    I have just started with Java3D programming. I thought I had built up some basic intuition about how the scene graph works, but something that should work, does not work. I made a simple program for rotating a pyramid around the y-axis. This was done just by adding a RotationInterpolator R to the TransformGroup above the pyramid. Then I thought hey, can I now remove the RotationInterpolator from this TransformGroup, then add it to the TransformGroup above my ViewPlatform leaf. This should work if I have understood how things work. Adding the RotationInterpolator to this TransformGroup, should make the children of this TransformGroup rotate, and the ViewingPlatform is a child of the TransformGroup. Any ideas on where my reasoning is flawed? Here is the code for setting up the universe, and the view branchgroup. import java.awt.*; import java.awt.event.*; import javax.media.j3d.*; import javax.vecmath.*; public class UniverseBuilder { // User-specified canvas Canvas3D canvas; // Scene graph elements to which the user may want access VirtualUniverse universe; Locale locale; TransformGroup vpTrans; View view; public UniverseBuilder(Canvas3D c) { this.canvas = c; // Establish a virtual universe that has a single // hi-res Locale universe = new VirtualUniverse(); locale = new Locale(universe); // Create a PhysicalBody and PhysicalEnvironment object PhysicalBody body = new PhysicalBody(); PhysicalEnvironment environment = new PhysicalEnvironment(); // Create a View and attach the Canvas3D and the physical // body and environment to the view. view = new View(); view.addCanvas3D(c); view.setPhysicalBody(body); view.setPhysicalEnvironment(environment); // Create a BranchGroup node for the view platform BranchGroup vpRoot = new BranchGroup(); // Create a ViewPlatform object, and its associated // TransformGroup object, and attach it to the root of the // subgraph. Attach the view to the view platform. Transform3D t = new Transform3D(); Transform3D s = new Transform3D(); t.set(new Vector3f(0.0f, 0.0f, 10.0f)); t.rotX(-Math.PI/4); s.set(new Vector3f(0.0f, 0.0f, 10.0f)); //forandre verdier her for å endre viewing position t.mul(s); ViewPlatform vp = new ViewPlatform(); vpTrans = new TransformGroup(t); vpTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); // Rotator stuff Transform3D yAxis = new Transform3D(); //yAxis.rotY(Math.PI/2); Alpha rotationAlpha = new Alpha( -1, Alpha.INCREASING_ENABLE, 0, 0,4000, 0, 0, 0, 0, 0); RotationInterpolator rotator = new RotationInterpolator( rotationAlpha, vpTrans, yAxis, 0.0f, (float) Math.PI*2.0f); RotationInterpolator rotator2 = new RotationInterpolator( rotationAlpha, vpTrans); BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 1000.0); rotator.setSchedulingBounds(bounds); vpTrans.addChild(rotator); vpTrans.addChild(vp); vpRoot.addChild(vpTrans); view.attachViewPlatform(vp); // Attach the branch graph to the universe, via the // Locale. The scene graph is now live! locale.addBranchGraph(vpRoot); } public void addBranchGraph(BranchGroup bg) { locale.addBranchGraph(bg); } }

    Read the article

  • Trouble rotating viewplatform in Java3D [closed]

    - by user29163
    I have just started with Java3D programming. I thought I had built up some basic intuition about how the scene graph works, but something that should work, does not work. I made a simple program for rotating a pyramid around the y-axis. This was done just by adding a RotationInterpolator R to the TransformGroup above the pyramid. Then I thought hey, can I now remove the RotationInterpolator from this TransformGroup, then add it to the TransformGroup above my ViewPlatform leaf. This should work if I have understood how things work. Adding the RotationInterpolator to this TransformGroup, should make the children of this TransformGroup rotate, and the ViewingPlatform is a child of the TransformGroup. Any ideas on where my reasoning is flawed? Here is the code for setting up the universe, and the view branchgroup. import java.awt.*; import java.awt.event.*; import javax.media.j3d.*; import javax.vecmath.*; public class UniverseBuilder { // User-specified canvas Canvas3D canvas; // Scene graph elements to which the user may want access VirtualUniverse universe; Locale locale; TransformGroup vpTrans; View view; public UniverseBuilder(Canvas3D c) { this.canvas = c; // Establish a virtual universe that has a single // hi-res Locale universe = new VirtualUniverse(); locale = new Locale(universe); // Create a PhysicalBody and PhysicalEnvironment object PhysicalBody body = new PhysicalBody(); PhysicalEnvironment environment = new PhysicalEnvironment(); // Create a View and attach the Canvas3D and the physical // body and environment to the view. view = new View(); view.addCanvas3D(c); view.setPhysicalBody(body); view.setPhysicalEnvironment(environment); // Create a BranchGroup node for the view platform BranchGroup vpRoot = new BranchGroup(); // Create a ViewPlatform object, and its associated // TransformGroup object, and attach it to the root of the // subgraph. Attach the view to the view platform. Transform3D t = new Transform3D(); Transform3D s = new Transform3D(); t.set(new Vector3f(0.0f, 0.0f, 10.0f)); t.rotX(-Math.PI/4); s.set(new Vector3f(0.0f, 0.0f, 10.0f)); //forandre verdier her for å endre viewing position t.mul(s); ViewPlatform vp = new ViewPlatform(); vpTrans = new TransformGroup(t); vpTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); // Rotator stuff Transform3D yAxis = new Transform3D(); //yAxis.rotY(Math.PI/2); Alpha rotationAlpha = new Alpha( -1, Alpha.INCREASING_ENABLE, 0, 0,4000, 0, 0, 0, 0, 0); RotationInterpolator rotator = new RotationInterpolator( rotationAlpha, vpTrans, yAxis, 0.0f, (float) Math.PI*2.0f); RotationInterpolator rotator2 = new RotationInterpolator( rotationAlpha, vpTrans); BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 1000.0); rotator.setSchedulingBounds(bounds); vpTrans.addChild(rotator); vpTrans.addChild(vp); vpRoot.addChild(vpTrans); view.attachViewPlatform(vp); // Attach the branch graph to the universe, via the // Locale. The scene graph is now live! locale.addBranchGraph(vpRoot); } public void addBranchGraph(BranchGroup bg) { locale.addBranchGraph(bg); } }

    Read the article

  • JSF:Resourcebundle Problem with Internationalization

    - by Sven
    I implemented internationalization like in that tutorial! When I change the language in my app. It works. But only until the next request happens. Then language settings are reset to my standard language -.- What am I missing here: LanguageBean.java @ManagedBean(name="language") @SessionScoped public class LanguageBean implements Serializable{ private static final long serialVersionUID = 1L; private String localeCode; private static Map<String,Object> countries; static{ countries = new LinkedHashMap<String,Object>(); countries.put("Deutsch", Locale.GERMAN); //label, value countries.put("English", Locale.ENGLISH); } public Map<String, Object> getCountriesInMap() { return countries; } public String getLocaleCode() { return localeCode; } public void setLocaleCode(String localeCode) { this.localeCode = localeCode; } //value change event listener public void countryLocaleCodeChanged(ValueChangeEvent e){ String newLocaleValue = e.getNewValue().toString(); //loop country map to compare the locale code for (Map.Entry<String, Object> entry : countries.entrySet()) { if(entry.getValue().toString().equals(newLocaleValue)){ FacesContext.getCurrentInstance() .getViewRoot().setLocale((Locale)entry.getValue()); } } } } my facelets template: <h:selectOneMenu value="#{language.localeCode}" onchange="submit()" valueChangeListener="#{language.countryLocaleCodeChanged}"> <f:selectItems value="#{language.countriesInMap}" /> </h:selectOneMenu> faces-config: <application> <locale-config> <default-locale>de</default-locale> </locale-config> <resource-bundle> <base-name>org.dhbw.stg.wwi2008c.mopro.ui.text</base-name> <var>msg</var> </resource-bundle> </application>

    Read the article

  • Weird behaviour with Scanner#nextFloat

    - by James P.
    Running the following in Eclipse initially caused Scanner to not recognize carriage returns in the console effectively blocking further input: price = sc.nextFloat(); Adding this line before the code causes Scanner to accept 0,23 (french notation) as a float: Locale.setDefault(Locale.US); This is most probably due to regional settings in Windows XP Pro. When the code is run again 0,23 is still accepted and entering 0.23 causes it to throw a java.util.InputMismatchException. Any explanation as to why this is happening? Also is there a workaround or should I just use Float#parseFloat? Edit: import java.util.Locale; import java.util.Scanner; public class NexFloatTest { public static void main(String[] args) { //Locale.setDefault(Locale.US); //Locale.setDefault(Locale.FRANCE); // Gives fr_BE on this system System.out.println(Locale.getDefault()); float price; String uSDecimal = "0.23"; String frenchDecimal = "0,23"; Scanner sc = new Scanner(uSDecimal); try{ price = sc.nextFloat(); System.out.println(price); } catch (java.util.InputMismatchException e){ e.printStackTrace(); } try{ sc = new Scanner(frenchDecimal); price = sc.nextFloat(); System.out.println(price); } catch (java.util.InputMismatchException e){ e.printStackTrace(); } String title = null; System.out.print("Enter title:"); try{ title = sc.nextLine(); // This line is skippe } catch(java.util.NoSuchElementException e ){ e.printStackTrace(); } System.out.print(title); } }

    Read the article

  • IntelliJ: Adding resources to the class path, but still gives me "java.util.MissingResourceException: Can't find bundle.... locale en_US"

    - by Martin
    I am quite new to intellij and i have loaded in a project that i wish to compile, everything seems to be going well, but when i compile it. I get the bundle cannot be found. java.util.MissingResourceException: Can't find bundle for base name openfire_i18n, locale en_US at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499) After doing some investigation, it appears i have to include the resources in the class path, is this correct? I have done Project Settings, Modules, Dependencies, and i added a "Jars or directories" There is a checkbox that says Export, i have tried clicking it and unclicking it :-) My resources i can see are in i8n\ResourceBundle I tried adding the i8n and it asked me for a category for selected files, i put classes RUN - but still same error.. so i tried adding the i8n/ResourceBundle directory RUN - still same error. I notice under my ResourceBundle directory there are C:\Dev\Java\openfire_src_3_7_1\openfire_src\src\i18n\openfire_i18n_en.properties but there is no specific en_US but i thought it supposed to fallback to EN ?? SO i think everything is ok. Can anyone help I am really stuck Thanks

    Read the article

  • How bad is for SEO to "redirect" an user depending on his browser locale ?

    - by bgy
    For a personnal page I use the MultiViews options in Apache to determine which page he should see depending on his locale. Here is what I do. Options MultiViews AddLanguage fr .fr AddLanguage en .en <IfModule mod_negotiation.c> LanguagePriority fr en </IfModule> I am wondering if it is bad for SEO to do this since Googlebot will probably fall on 'fr' or 'en' but not both. Would it be fixed if I add a link inside my page to the different language page.

    Read the article

  • Using Google to find programming answers (does locale matter)?

    - by Jason
    I have overseas developers working for me, and sometimes I am surprised they can't find the same resources online that I do. They are in a South America country... and Google defaults to their language/locale. What do you think about this, when using it to solve computer programs? There is very little software development done in their country (as compared to the US). Is Google skewing their results for articles in their language or posted on sites that are local to them? Should I insist that they bypass their local Google search and have them use the US version?

    Read the article

  • apt-get is broken

    - by Amol Shinde
    I Cannot install any package in the server, As I am newbie in Server. In Morning I found that some, I am not able to install any package from command line in the server,Now every package is now manually downloaded packages and then installed in the server. Can any one Please tell me what is the issue and how could it be resolved. OS:- Ubuntu 10.04.4 LTS \n \l (64 Bit) Below is the error: iam@ubuntu$ sudo apt-get install pidgin Reading package lists... Done Building dependency tree Reading state information... Done pidgin is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 102 not upgraded. 32 not fully installed or removed. After this operation, 0B of additional disk space will be used. Traceback (most recent call last): File "/usr/bin/apt-listchanges", line 33, in <module> from ALChacks import * File "/usr/share/apt-listchanges/ALChacks.py", line 32, in <module> sys.stderr.write(_("Can't set locale; make sure $LC_* and $LANG are correct!\n")) NameError: name '_' is not defined perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_IN" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory Setting up shared-mime-info (0.71-1ubuntu2) ... /var/lib/dpkg/info/shared-mime-info.postinst: line 13: 21935 Segmentation fault update-mime-database.real /usr/share/mime dpkg: error processing shared-mime-info (--configure): subprocess installed post-installation script returned error exit status 139 dpkg: dependency problems prevent configuration of libgtk2.0-0: libgtk2.0-0 depends on shared-mime-info; however: Package shared-mime-info is not configured yet. dpkg: error processing libgtk2.0-0 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of chromium-browser: chromium-browser depends on libgtk2.0-0 (>= 2.20.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing chromium-browser (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of chromium-codecs-ffmpeg: chromium-codecs-ffmpeg depends on chromium-browser (>= 4.0.203.0~); however: Package chromium-browser is not configured yet. dpkg: error processing chromium-codecs-ffmpeg (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of chromium-browser-l10n: chromium-browser-l10n depends on chromium-browser (= 18.0.1025.151~r130497-0ubuntu0.10.04.No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already 1); however: Package chromium-browser is not configured yet. dpkg: error processing chromium-browser-l10n (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libevdocument2: libevdocument2 depends on libgtk2.0-0 (>= 2.14.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing libevdocument2 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libevview2: libevview2 depends on libevdocument2 (>= 2.29.5); however: Package libevdocument2 is not configured yet. libevview2 depends on libgtk2.0-0 (>= 2.20.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing libevview2 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of evince: evince depends on libevdocument2 (>= 2.29.5); however: Package libevdocument2 is not configured yet. evince depends on libevview2 (>= 2.29.No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already 5); however: Package libevview2 is not configured yet. evince depends on libgtk2.0-0 (>= 2.16.0); however: Package libgtk2.0-0 is not configured yet. evince depends on shared-mime-info; however: Package shared-mime-info is not configured yet. dpkg: error processing evince (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of firefox: firefox depends on libgtk2.0-0 (>= 2.20.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing firefox (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gcalctool: gcalctool depends on libgtk2.0-0 (>= 2.18.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing gcalctool (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libgdict-1.0-6: libgdict-1.0-6 depends on libgtk2.0-0 (>= 2.18.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing libgdict-1.0-6 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gnome-utils: gnome-utils depends on libgdict-1.0-6 (>= 2.23.90); however: Package libgdict-1.0-6 is not configured yet. gnome-utils depends on libgtk2.0-0 (>= 2.18.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing gnome-utils (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gtk2-engines-pixbuf: gtk2-engines-pixbuf depends on gtk2.0-binver-2.10.0; however: Package gtk2.0-binver-2.10.0 is not installed. Package libgtk2.0-0 which provides gtk2.0-binver-2.10.0 is not configured yet. gtk2-engines-pixbuf depends on libgtk2.0-0 (= 2.20.1-0ubuntu2.1); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing gtk2-engines-pixbuf (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libedataserverui1.2-8: libedataserverui1.2-8 depends on libgtk2.0-0 (>= 2.14.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing libedataserverui1.2-8 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libgail18: libgail18 depends on libgtk2.0-0 (= 2.20.1-0ubuntu2.1); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing libgail18 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libgtk2.0-bin: libgtk2.0-bin depends on libgtk2.0-0 (>= 2.20.1-0ubuntu2.1); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing libgtk2.0-bin (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libgtk2.0-dev: libgtk2.0-dev depends on libgtk2.0-0 (= 2.20.1-0ubuntu2.1); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing libgtk2.0-dev (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libnotify-dev: libnotify-dev depends on libgtk2.0-dev (>= 2.10); however: Package libgtk2.0-dev is not configured yet. dpkg: error processing libnotify-dev (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of network-manager-gnome: network-manager-gnome depends on libgtk2.0-0 (>= 2.16.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing network-manager-gnome (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of openoffice.org-core: openoffice.org-core depends on libgtk2.0-0 (>= 2.10); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing openoffice.org-core (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of openoffice.org-draw: openoffice.org-draw depends on openoffice.org-core (= 1:3.2.0-7ubuntu4.4); however: Package openoffice.org-core is not configured yet. dpkg: error processing openoffice.org-draw (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of openoffice.org-impress: openoffice.org-impress depends on openoffice.org-core (= 1:3.2.0-7ubuntu4.4); however: Package openoffice.org-core is not configured yet. openoffice.org-impress depends on openoffice.org-draw (= 1:3.2.0-7ubuntu4.4); however: Package openoffice.org-draw is not configured yet. dpkg: error processing openoffice.org-impress (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of pidgin: pidgin depends on libgtk2.0-0 (>= 2.18.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing pidgin (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already Setting up update-manager (1:0.134.12.1) ... locale: Cannot set LC_CTYPE to default locale: No such file or directory dpkg: error processing update-manager (--configure): subprocess installed post-installation script returned error exit status 245 No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of update-notifier: update-notifier depends on libgtk2.0-0 (>= 2.14.0); however: Package libgtk2.0-0 is not configured yet. update-notifier depends on update-manager; however: Package update-manager is not configured yet. dpkg: error processing update-notifier (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of xulrunner-1.9.2: xulrunner-1.9.2 depends on libgtk2.0-0 (>= 2.18.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing xulrunner-1.9.2 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of xulrunner-1.9.2-dev: xulrunner-1.9.2-dev depends on xulrunner-1.9.2 (= 1.9.2.28+build1+nobinonly-0ubuntu0.10.04.1); however: Package xulrunner-1.9.2 is not configured yet. xulrunner-1.9.2-dev depends on libnotify-dev; however: Package libnotify-dev is not configured yet. dpkg: error processing xulrunner-1.9.2-dev (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of icedtea6-plugin: icedtea6-plugin depends on xulrunner-1.9.2; however: Package xulrunner-1.9.2 is not configured yet. icedtea6-plugin depends on libgtk2.0-0 (>= 2.8.0); however: Package libgtk2.0-0 is not configured yet. dpkg: error processing icedtea6-plugin (--configure): dependency problems - leaving unconfigured Setting up libgweather-common (2.30.0-0ubuntu1.1) ... No apport report written because MaxReports is reached already locale: Cannot set LC_CTYPE to default locale: No such file or directory dpkg: error processing libgweather-common (--configure): subprocess installed post-installation script returned error exit status 245 No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of libgweather1: libgweather1 depends on libgtk2.0-0 (>= 2.11.0); however: Package libgtk2.0-0 is not configured yet. libgweather1 depends on libgweather-common (>= 2.24.0); however: Package libgweather-common is not configured yet. dpkg: error processing libgweather1 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of openoffice.org-style-galaxy: openoffice.org-style-galaxy depends on openoffice.org-core (>= 1:3.2.0~beta); however: Package openoffice.org-core is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing openoffice.org-style-galaxy (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of openoffice.org-common: openoffice.org-common depends on openoffice.org-style-default | openoffice.org-style; however: Package openoffice.org-style-default is not installed. Package openoffice.org-style-galaxy which provides openoffice.org-style-default is not configured yet. Package openoffice.org-style is not installed. Package openoffice.org-style-galaxy which provides openoffice.org-style is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing openoffice.org-common (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already Errors were encountered while processing: shared-mime-info libgtk2.0-0 chromium-browser chromium-codecs-ffmpeg chromium-browser-l10n libevdocument2 libevview2 evince firefox gcalctool libgdict-1.0-6 gnome-utils gtk2-engines-pixbuf libedataserverui1.2-8 libgail18 libgtk2.0-bin libgtk2.0-dev libnotify-dev network-manager-gnome openoffice.org-core openoffice.org-draw openoffice.org-impress pidgin update-manager update-notifier xulrunner-1.9.2 xulrunner-1.9.2-dev icedtea6-plugin libgweather-common libgweather1 openoffice.org-style-galaxy openoffice.org-common E: Sub-process /usr/bin/dpkg returned an error code (1) While typing command in terminal, command is not auto-completing.

    Read the article

  • Suspend not working after kernel update on an HP Envy14 1050

    - by leoxweb
    I just update ubuntu 12.04 to the kernel 3.2.0-30 and together with it a lot of packeges in the system. I am running it on an HP Envy14 1050. When I first made a fresh install of the clean ubuntu 12.04 I had the problem that when restoring from suspend the screen was black, although some backlight was there. I could fix it following this https://bugs.launchpad.net/ubuntu/+source/linux/+bug/989674/comments/20. Now, after the update the black screen after suspend has reappeared but with no backlight at all and the led in the caps lock key blinking. The laptop is using a ATI radeon 5600 with the privative drivers. During the update process there was an error with depmod . You can see the /var/log/dist-upgrade/apt-term.log file at the end. UPDATE: suspend is not working at all. The problem is not when restoring from suspend, but when I try to suspend the system it gets blocked and the fan running. Only option is to press power button. Log started: 2012-09-12 00:46:46 (Reading database ... 198909 files and directories currently installed.) Removing icedtea-7-jre-cacao ... Selecting previously unselected package linux-image-3.2.0-30-generic. (Reading database ... 198901 files and directories currently installed.) Unpacking linux-image-3.2.0-30-generic (from .../linux-image-3.2.0-30-generic_3.2.0-30.48_amd64.deb) ... Done. Preparing to replace icedtea-7-jre-jamvm 7~u3-2.1.1~pre1-1ubuntu3 (using .../icedtea-7-jre-jamvm_7u7-2.3.2-1ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement icedtea-7-jre-jamvm ... Preparing to replace openjdk-7-jre-lib 7~u3-2.1.1~pre1-1ubuntu3 (using .../openjdk-7-jre-lib_7u7-2.3.2-1ubuntu0.12.04.1_all.deb) ... Unpacking replacement openjdk-7-jre-lib ... Preparing to replace openjdk-7-jre-headless 7~u3-2.1.1~pre1-1ubuntu3 (using .../openjdk-7-jre-headless_7u7-2.3.2-1ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement openjdk-7-jre-headless ... Preparing to replace python-problem-report 2.0.1-0ubuntu12 (using .../python-problem-report_2.0.1-0ubuntu13_all.deb) ... Unpacking replacement python-problem-report ... Preparing to replace python-apport 2.0.1-0ubuntu12 (using .../python-apport_2.0.1-0ubuntu13_all.deb) ... Unpacking replacement python-apport ... Preparing to replace apport 2.0.1-0ubuntu12 (using .../apport_2.0.1-0ubuntu13_all.deb) ... apport stop/waiting Unpacking replacement apport ... Preparing to replace apport-gtk 2.0.1-0ubuntu12 (using .../apport-gtk_2.0.1-0ubuntu13_all.deb) ... Unpacking replacement apport-gtk ... Preparing to replace firefox-globalmenu 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-globalmenu_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-globalmenu ... Preparing to replace firefox 15.0+build1-0ubuntu0.12.04.1 (using .../firefox_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox ... Preparing to replace firefox-gnome-support 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-gnome-support_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-gnome-support ... Preparing to replace firefox-locale-en 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-locale-en_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-locale-en ... Preparing to replace firefox-locale-es 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-locale-es_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-locale-es ... Preparing to replace firefox-locale-zh-hans 15.0+build1-0ubuntu0.12.04.1 (using .../firefox-locale-zh-hans_15.0.1+build1-0ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement firefox-locale-zh-hans ... Preparing to replace totem-mozilla 3.0.1-0ubuntu21 (using .../totem-mozilla_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement totem-mozilla ... Preparing to replace libtotem0 3.0.1-0ubuntu21 (using .../libtotem0_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement libtotem0 ... Preparing to replace totem-plugins 3.0.1-0ubuntu21 (using .../totem-plugins_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement totem-plugins ... Preparing to replace totem 3.0.1-0ubuntu21 (using .../totem_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement totem ... Preparing to replace totem-common 3.0.1-0ubuntu21 (using .../totem-common_3.0.1-0ubuntu21.1_all.deb) ... Unpacking replacement totem-common ... Preparing to replace gir1.2-totem-1.0 3.0.1-0ubuntu21 (using .../gir1.2-totem-1.0_3.0.1-0ubuntu21.1_amd64.deb) ... Unpacking replacement gir1.2-totem-1.0 ... Preparing to replace glib-networking-common 2.32.1-1ubuntu1 (using .../glib-networking-common_2.32.1-1ubuntu2_all.deb) ... Unpacking replacement glib-networking-common ... Preparing to replace glib-networking 2.32.1-1ubuntu1 (using .../glib-networking_2.32.1-1ubuntu2_amd64.deb) ... Unpacking replacement glib-networking ... Preparing to replace glib-networking-services 2.32.1-1ubuntu1 (using .../glib-networking-services_2.32.1-1ubuntu2_amd64.deb) ... Unpacking replacement glib-networking-services ... Preparing to replace linux-firmware 1.79 (using .../linux-firmware_1.79.1_all.deb) ... Unpacking replacement linux-firmware ... Preparing to replace linux-generic 3.2.0.29.31 (using .../linux-generic_3.2.0.30.32_amd64.deb) ... Unpacking replacement linux-generic ... Preparing to replace linux-image-generic 3.2.0.29.31 (using .../linux-image-generic_3.2.0.30.32_amd64.deb) ... Unpacking replacement linux-image-generic ... Selecting previously unselected package linux-headers-3.2.0-30. Unpacking linux-headers-3.2.0-30 (from .../linux-headers-3.2.0-30_3.2.0-30.48_all.deb) ... Selecting previously unselected package linux-headers-3.2.0-30-generic. Unpacking linux-headers-3.2.0-30-generic (from .../linux-headers-3.2.0-30-generic_3.2.0-30.48_amd64.deb) ... Preparing to replace linux-headers-generic 3.2.0.29.31 (using .../linux-headers-generic_3.2.0.30.32_amd64.deb) ... Unpacking replacement linux-headers-generic ... Preparing to replace linux-libc-dev 3.2.0-29.46 (using .../linux-libc-dev_3.2.0-30.48_amd64.deb) ... Unpacking replacement linux-libc-dev ... Preparing to replace openjdk-7-jre 7~u3-2.1.1~pre1-1ubuntu3 (using .../openjdk-7-jre_7u7-2.3.2-1ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement openjdk-7-jre ... Preparing to replace openjdk-7-jdk 7~u3-2.1.1~pre1-1ubuntu3 (using .../openjdk-7-jdk_7u7-2.3.2-1ubuntu0.12.04.1_amd64.deb) ... Unpacking replacement openjdk-7-jdk ... Preparing to replace policykit-1-gnome 0.105-1ubuntu3 (using .../policykit-1-gnome_0.105-1ubuntu3.1_amd64.deb) ... Unpacking replacement policykit-1-gnome ... Preparing to replace xserver-xorg-input-synaptics 1.6.2-1ubuntu1~precise1 (using .../xserver-xorg-input-synaptics_1.6.2-1ubuntu1~precise2_amd64.deb) ... Unpacking replacement xserver-xorg-input-synaptics ... Processing triggers for ureadahead ... ureadahead will be reprofiled on next reboot Processing triggers for hicolor-icon-theme ... Processing triggers for shared-mime-info ... Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' Unknown media type in type 'uri/mms' Unknown media type in type 'uri/mmst' Unknown media type in type 'uri/mmsu' Unknown media type in type 'uri/pnm' Unknown media type in type 'uri/rtspt' Unknown media type in type 'uri/rtspu' Processing triggers for man-db ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Processing triggers for gconf2 ... Processing triggers for libglib2.0-0:i386 ... Processing triggers for libglib2.0-0 ... Setting up linux-image-3.2.0-30-generic (3.2.0-30.48) ... Running depmod. update-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic Error! Problems with depmod detected. Automatically uninstalling this module. DKMS: Install Failed (depmod problems). Module rolled back to built state. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic update-initramfs: Generating /boot/initrd.img-3.2.0-30-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-30-generic Found initrd image: /boot/initrd.img-3.2.0-30-generic Found linux image: /boot/vmlinuz-3.2.0-29-generic Found initrd image: /boot/initrd.img-3.2.0-29-generic Found linux image: /boot/vmlinuz-3.2.0-23-generic Found initrd image: /boot/initrd.img-3.2.0-23-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows 7 (loader) on /dev/sda1 Found Windows Recovery Environment (loader) on /dev/sda2 Found Windows Recovery Environment (loader) on /dev/sda3 done Setting up python-problem-report (2.0.1-0ubuntu13) ... Setting up python-apport (2.0.1-0ubuntu13) ... Setting up apport (2.0.1-0ubuntu13) ... apport start/running Setting up apport-gtk (2.0.1-0ubuntu13) ... Setting up firefox (15.0.1+build1-0ubuntu0.12.04.1) ... Please restart all running instances of firefox, or you will experience problems. Setting up firefox-globalmenu (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up firefox-gnome-support (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up firefox-locale-en (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up firefox-locale-es (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up firefox-locale-zh-hans (15.0.1+build1-0ubuntu0.12.04.1) ... Setting up libtotem0 (3.0.1-0ubuntu21.1) ... Setting up totem-common (3.0.1-0ubuntu21.1) ... Setting up totem (3.0.1-0ubuntu21.1) ... Setting up totem-mozilla (3.0.1-0ubuntu21.1) ... Setting up gir1.2-totem-1.0 (3.0.1-0ubuntu21.1) ... Setting up totem-plugins (3.0.1-0ubuntu21.1) ... Setting up glib-networking-common (2.32.1-1ubuntu2) ... Setting up glib-networking-services (2.32.1-1ubuntu2) ... Setting up glib-networking (2.32.1-1ubuntu2) ... Setting up linux-firmware (1.79.1) ... Setting up linux-image-generic (3.2.0.30.32) ... Setting up linux-generic (3.2.0.30.32) ... Setting up linux-headers-3.2.0-30 (3.2.0-30.48) ... Setting up linux-headers-3.2.0-30-generic (3.2.0-30.48) ... Examining /etc/kernel/header_postinst.d. run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic Setting up linux-headers-generic (3.2.0.30.32) ... Setting up linux-libc-dev (3.2.0-30.48) ... Setting up policykit-1-gnome (0.105-1ubuntu3.1) ... Setting up xserver-xorg-input-synaptics (1.6.2-1ubuntu1~precise2) ... Setting up openjdk-7-jre-headless (7u7-2.3.2-1ubuntu0.12.04.1) ... Installing new version of config file /etc/java-7-openjdk/security/java.security ... Installing new version of config file /etc/java-7-openjdk/jvm-amd64.cfg ... Setting up openjdk-7-jre-lib (7u7-2.3.2-1ubuntu0.12.04.1) ... Setting up icedtea-7-jre-jamvm (7u7-2.3.2-1ubuntu0.12.04.1) ... Setting up openjdk-7-jre (7u7-2.3.2-1ubuntu0.12.04.1) ... Setting up openjdk-7-jdk (7u7-2.3.2-1ubuntu0.12.04.1) ... update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/bin/jcmd to provide /usr/bin/jcmd (jcmd) in auto mode. Processing triggers for libc-bin ... ldconfig deferred processing now taking place Log ended: 2012-09-12 00:49:16

    Read the article

  • UIDatePicker - Problem Localizing

    - by Smorpheus
    Hello, I've created a UIDatePicker in my app and I also have support for several languages. My UIDatePicker is created in Interface Builder, and I have created a seperate localization XIB so I can customize my UIDatePicker. Setting the "Locale" option in IB appears to do nothing. Attempting to change my DatePicker programatically with Locale and NSCalender also do nothing via the following code: NSLocale * locale = [[NSLocale alloc] initWithLocaleIdentifier:@"es_ES"]; datePicker.locale = locale; datePicker.calender = [locale objectForKey:NSLocaleCalender]; This results in an english picker. Here's the really weird thing though. The word for "Today" is translated. As seen in the attached screenshot. (OK I'm not allowed to post images. But imagine a Date & Time picker with "May" in English and "Today" written "Ajourd'hui". Based on what I've read, adding the UIDatePicker programatically doesn't seem to help much.

    Read the article

  • How can I make the Rails 3 router localize URLs using localization files?

    - by edgerunner
    What I'd like to be able to do is: in config/routes.rb resources :posts in config/locale/en.yml en: resources: posts: "posts" new: "new" edit: "edit" in config/locale/tr.yml tr: resources: posts: "yazilar" new: "yeni" edit: "duzenle" and get I18n.locale = :en edit_post_path(3) #=> /posts/3/edit I18n.locale = :tr edit_post_path(3) #=> /yazilar/3/duzenle I'd also like Rails to match any of these routes anytime and pass the associated locale in the params hash such that when I navigate to /yazilar , the request should be routed to the posts#index action with the :tr locale in the params hash. Any simple or complex way of doing that?

    Read the article

  • Can't remove burg theme packages

    - by Lassi
    Today after trying to install and remove BURG and few themes I faced an issue. Now I can't install or remove anything. Here is the output (unfortunately partly in Finnish, I couldn't change language since it also seems to depend on package listings: lassi@lassi-ubuntu:~$ sudo apt-get autoremove Luetaan pakettiluetteloita... Valmis Muodostetaan riippuvuussuhteiden puu Luetaan tilatietoja... Valmis Seuraavat paketit POISTETAAN: burg-theme-fortune burg-theme-gnome burg-theme-picchio 0 päivitetty, 0 uutta asennusta, 3 poistettavaa ja 0 päivittämätöntä. 3 ei asennettu kokonaan tai poistettiin. Toiminnon jälkeen vapautuu 7 180 k t levytilaa. Haluatko jatkaa [K/e]? k (Luetaan tietokantaa... 166462 files and directories currently installed.) Poistetaan pakettia burg-theme-fortune... sudo: update-burg: command not found dpkg: virhe käsiteltäessä burg-theme-fortune (--remove): aliprosessi installed post-removal script palautti virhetilakoodin 1 Poistetaan pakettia burg-theme-gnome... sudo: update-burg: command not found dpkg: virhe käsiteltäessä burg-theme-gnome (--remove): aliprosessi installed post-removal script palautti virhetilakoodin 1 Poistetaan pakettia burg-theme-picchio... sudo: update-burg: command not found dpkg: virhe käsiteltäessä burg-theme-picchio (--remove): aliprosessi installed post-removal script palautti virhetilakoodin 1 Käsittelyssä tapahtui liian monta virhettä: burg-theme-fortune burg-theme-gnome burg-theme-picchio E: Sub-process /usr/bin/dpkg returned an error code (1) Basically what seems to happen is this: It creates the package lists, then tries to remove packet burg-theme-fortune. This fails as update-burg command was not found. Then dpkg reports an error while processing the packet. Same goes with all 3 packages. In the end it claims that there were too many errors, and packages stay installed. I also tried installing burg as it tries to run command update-burg, but appears that it tries to delete these packages always when I try to install or remove or do anything with apt. Any ideas how I could solve this issue? Edit: Here is the output of apt-get install burg (tried installing again to get English output) lassi@lassi-ubuntu:~$ LC_ALL=C sudo apt-get install burg [sudo] password for lassi: Reading package lists... Done Building dependency tree Reading state information... Done burg is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. Need to get 0 B/6169 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y (Reading database ... 167497 files and directories currently installed.) Preparing to replace burg-theme-fortune 0.5.0-1 (using .../burg-theme-fortune_0.5.0-1_all.deb) ... Unpacking replacement burg-theme-fortune ... Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: warning: subprocess old post-removal script returned error exit status 1 dpkg - trying script from the new package instead ... Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: error processing /var/cache/apt/archives/burg-theme-fortune_0.5.0-1_all.deb (--unpack): subprocess new post-removal script returned error exit status 1 Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: error while cleaning up: subprocess new post-removal script returned error exit status 1 Preparing to replace burg-theme-gnome 0.5.0-1 (using .../burg-theme-gnome_0.5.0-1_all.deb) ... Unpacking replacement burg-theme-gnome ... Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: warning: subprocess old post-removal script returned error exit status 1 dpkg - trying script from the new package instead ... Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: error processing /var/cache/apt/archives/burg-theme-gnome_0.5.0-1_all.deb (--unpack): subprocess new post-removal script returned error exit status 1 Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: error while cleaning up: subprocess new post-removal script returned error exit status 1 Preparing to replace burg-theme-picchio 0.5.0-1 (using .../burg-theme-picchio_0.5.0-1_all.deb) ... Unpacking replacement burg-theme-picchio ... Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: warning: subprocess old post-removal script returned error exit status 1 dpkg - trying script from the new package instead ... Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: error processing /var/cache/apt/archives/burg-theme-picchio_0.5.0-1_all.deb (--unpack): subprocess new post-removal script returned error exit status 1 Generating burg.cfg ... /usr/sbin/burg-probe: error: cannot stat `/boot/burg/locale'. No path or device is specified. Try `/usr/sbin/burg-probe --help' for more information. dpkg: error while cleaning up: subprocess new post-removal script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/burg-theme-fortune_0.5.0-1_all.deb /var/cache/apt/archives/burg-theme-gnome_0.5.0-1_all.deb /var/cache/apt/archives/burg-theme-picchio_0.5.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) lassi@lassi-ubuntu:~$

    Read the article

  • Is it safe to run upgrade with Pinned Applications in Synaptic

    - by BlueXrider
    I have firefox, thunderbird, thunderbird-locale-en, thunderbird-locale-en-us, xul-ext-calendar-timezones, xul-ext-gdata-provider and xul-ext-lightning pinned in Synaptic. When I run apt-get upgrade. I get the following The following packages will be upgraded: boot-repair boot-sav darktable firefox libvlc5 libvlccore5 thunderbird thunderbird-locale-en thunderbird-locale-en-us vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-pulse xul-ext-calendar-timezones xul-ext-gdata-provider xul-ext-lightning 17 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 53.0 MB of archives. After this operation, 606 kB of additional disk space will be used. Do you want to continue [Y/n]? Are these packages really going to be upgraded?

    Read the article

  • GNOME Desktop fonts problem debacle

    - by Diogenes Lantern
    I didn't get an answer but I wasn't doing anything and this is an interesting topic. In Ubuntu 12.04, opening a file in gedit or I am working on the command line, in dpkg, I get returned the error "locale not supported, falling back to default "C" libraries", and the one below, Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. The locales were not set correctly, and locale LANG and LANGUAGE were the culprits. I picked my way through this. The answer, correct below.

    Read the article

  • NetBeans ??????????????????

    - by user13137856
    NetBeans IDE ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????NetBeans ??????????????????????????????????????? % netbeans --locale en ??????????????????????????????????????????????????? $HOME/.netbeans $HOME/.cache/netbeans ?????? --userdir ????????????????????? % netbeans --locale en --userdir /tmp/my_newuserdir NetBeans ???????????????????????????????????????NetBeans ???????????????? jar ????????????????????????????????? git ??????????????????????2?????????? NetBeans ????????????(??????????????????????????) ide/modules/locale/org-netbeans-libs-git_ja.jar ide/modules/locale/org-netbeans-modules-git_ja.jar ??? FAQ????????: NetBeans ? UI ???????????????????????? ????????????????????????????? NetBeans ??????????????????

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >