How can I add Language Switching button in Big Commerce header? - bigcommerce

I have setup two languages json files(en.json and fr-CA.json) and work perfectly if I switch the language locale preference in the browser. But Need a help to add an explicit language switching button in the header. How can i achieve this without using third party language switcher plugins?

Related

Missing Searchbar API for firefox quantum

Since firefox Quantum a lot of extension doesm't work anymore. One of them is the "add to Searchbar" extension. I searched in the firefox quantum Webextension API's after a solution to develop a new extension to add searchengines to the default searchinputfield. But it seems there is no api access to the searchengines list for reading or editing this List. And there is no posibility to replace the default searchbar because, you only can add a button to the toolbar. see:https://developer.mozilla.org/en-US/Add-ons/WebExtensions/user_interface.
Is there any possbility to get access to the searchbar? And if not where can I make a feauture Request?
Currently, this is not yet possible.
You are looking for these feature requests:
Add APIs to manage search engines for the web search bar/location bar
https://bugzilla.mozilla.org/show_bug.cgi?id=1268401
Add an API to list installed search engines
https://bugzilla.mozilla.org/show_bug.cgi?id=1352598
Please follow those bugs to keep up to date with the progress that is being made.

Library or API for file browser view?

I would like to implement a file browser view in my application so users can open files using a side panel similar to the browsers in XCode, Text Wrangler and some other programs.
Before I go off implementing another one of those browsers from scratch, does anyone know if there are existing libraries or APIs that already does this?
Google doesn't turn up with much and most of the searches point me to NSOpenPanel which I believe doesn't do what I want.
Thanks in advance.
The Cocoa class that is used to display hierarchical lists is called NSOutlineView.
Outline views provide several configuration options to adjust the appearance.
The content can be provided by implementing a data source protocol or via Cocoa bindings.
Apple has some sample code online that should get you started (it's a file browser - so maybe you can use larger parts of that sample):
https://developer.apple.com/library/mac/#samplecode/SourceView/Introduction/Intro.html

How to simulate a click in a webpage in iOS with objective-C

I'm looking for an equivalent of Mechanize (Ruby/python and more) for iOS.
I need to simulate a click in a webpage (form submission) and get the response back. I tried to construct a POST-request using ASIHTTPRequest without succes. I was able to create a solution in Ruby (with Mechanize) but I want to be able to do the same in objective-c for iphone development. Any suggestions ?
As described in the duplicated posts, the API to programmatically simulate touches is private, so not appropriate for a shipping app. Follow the links if you want to know how to do it anyway.

Which JavaScript framework for this drag-n-drop UI in a ROR3 website?

In a Ruby-on-Rails website, I want to create the following dialog, where a user is shown a list of colors and must choose 3 favorites and 3 least liked colors.
It works by dragging an item from the left and dropping it on the right.
What is the easiest and most maintainable library/method to implement this?
Notes: I am in the process of choosing a JavaScript framework for this website, so any proposition is fine. If that matters, the real thing is actually: among 15 work situations, choosing 5 that the user feels as most stressful, and 5 least stressful.
jQuery UI.
It has draggable and droppable. It is super easy to use, highly configurable and is the new standard javascript library in Rails 3.1.

How to develop a webapp which allows the user to add markup to text files?

I need to develop a simple webapp that allows the user to highlight a couple of words in the file (text or HTML) that he can load from the screen, and then right-click and have some options show up to choose from.
When she chooses the option , the text of it is added to the file shown on the screen,right after the highlighted text, inside some parenthesis or similar.
Is Ruby on Rails a suitable platform for developing such an app?
Is Grails more suitable ?
(Assuming similar level of knowledge in Groovy and Ruby)
In both cases, I'd appreciate pointers to gems/libraries I should be looking into for these tasks.
Thanks!
I'm not 100% sure I understand your requirements, but have you considered integrating a WYSIWYG (what-you-see-is-what-you-get) editor into your web app? Something like CKeditor is open-source, and effective.
You could load the file into the editor and setup a custom context menu like described in part 6 of this tutorial. So when the user right clicks in the editor, the custom context menu item could be configured to facilitate the insertion you are looking to accomplish.
I agree with corroded's advice to choose a language/framework you know and can work better in, as you'll be able to achieve your desired functionality through a variety of languages/frameworks.
Best of Luck!
Find a language/framework you know and can work better in. Also, you're gonna need some javascript magicks so I suggest using jquery. Here's a link on how to do your right click action: How to distinguish between left and right mouse click with jQuery
I think the function you describe is more about client user-friendliness than server processing. I think it's can only be done with javascript/jQuery or similar tools.
Same as tmarsden, I think a good way to do that is integrating a WYSIWYG free editor. I have done it before with TinyMCE, by writing a custom plugin for this tool. If you choose using Grails as server technology, you can take a look at TinyMCE plugin for Grails.