Localization in Fluent UI - i18next

I am trying to implement localization in react app using i18next and Fluent UI.
As seen here - https://developer.microsoft.com/en-us/fluentui#/styles/web/localization
The docs day "Fluent UI supports a variety of language codes, which map to the following font stacks: .."
How to set the 'language code' in Fluent UI to achieve the same ?

Late reply, but I was looking into the same thing. Looks like Fluent automatically adjusts a bunch of things based on your browser settings.
https://support.google.com/chrome/answer/173424?hl=en&co=GENIE.Platform=Desktop
You can customize the language in code using
<html lang="th-TH">

Related

Avalonia UI Carousel Example

I'm rather new to Avalonia UI / XAML / .NET MVVM in general. While I really like Avalonia so far, it's still in beta and lacks extensive documentation. Hence I sometimes struggle to get specific things working or finding out how I should use them correctly.
Could somebody point me to an example using the Carousel control? Which properties should I set in the xaml, what kind of item list should be behind it etc?
Cheers.
You can find usage example in ControlCatalog project from the main repository:
https://github.com/AvaloniaUI/Avalonia/blob/master/samples/ControlCatalog/Pages/CarouselPage.xaml
https://github.com/AvaloniaUI/Avalonia/blob/master/samples/ControlCatalog/Pages/CarouselPage.xaml.cs

How to apply page background images in tabris, preferable using stylesheets for iOS and/or Android devices

this is not clear to me from the documentation and from the current behavior I see in my app: The stylesheets work nice using a web browser, but not on the mobile app.
So what I was looking for is how to apply different background images in our mobile app (or at least colors) to the navigation page (top level pages list) and any other pages. We would like to apply different styles to the our current, I guess default style but don't know how to do this. So at this point I do not know what I can ask our graphics designer to provide.
Any docs that I missed or examples I can look at?
Thanks,
Vincent
The styles you are using for the web are applied by RAP's theming. Currently Tabris does not support theming. The only option you have at the moment is to use the SWT setBackground.Image methods on the widget itself. To behave different as in the web you could use RWT.getClient().getService( ClientDevice.class ).getPlatform(); to distinguish between the mobile and web client.

Using Ext "Neptune" theme with App SDK 2.0

Now that Rally has changed the default UI for their ALM product, I have noticed that the UI components in my apps don't fit the same styling characteristics as the default UI elements. I think it would look a lot cleaner if I could use Ext's "Neptune" theme: http://docs.sencha.com/extjs/4.2.2/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#basic-panels
Is there a way I can use this theme by default? If it is hosted anywhere within Rally, I think it would be as easy as including the CSS file in the App.html, but I could be wrong.
2.0rc1 is built on Ext 4.1.1a, so I'm not sure if the neptune theme is included or not. You'll be happy to know that 2.0rc2 is hot off the presses though, and should incorporate most of the new look and feel.
https://rally1.rallydev.com/apps/2.0rc2/sdk.js
https://help.rallydev.com/apps/2.0rc2/doc/

Metro Style Apps: WinJS a must?

Yesterday I have started developing my first Metro style App using JavaScript.
I've used one of those templates in Visual Studio 2011. This project template comes with a bunch of generated code which relies heavily on WinJS. The whole structure reminds of the ASP.NET with its Views and corresponding Code Behind files. There is also a navigator.js file which is responsible for the navigation between the Views. The whole data resides in the data.js and can be retrieved using different functions.
I worked with backbone.js and I found its concepts like MVC structure and routing pretty cool. My question is basically if you can implement such a Metro style App using backbone.js?
Can I eliminate WinJS and just start from scratch? Should I try to integrate backbone.js into the current structure? What would it look like then? Are there any restrictions for using third party JavaScript frameworks? Should I leave the generated structure as it is?
What are the best practices and patterns developing Metro Style Apps with JavaScript?
Thanks
You can use any JavaScript framework you like within a Metro-style JavaScript application. See this related question about jQuery:
jQuery and Windows 8 JavaScript Metro Style Apps
The WinJS framework performs a couple of functions, the first is a set of non-UI APIs for managing and manipulating data, making service requests etc ... These are easily replaced with other JavaScript frameworks. The second is the UI layer, here you might struggle a bit. The WinJS UI has been designed to follow the Metro Design Language. If you replace it with your own UI layer (using jQuery UI for example) your application will just not look right.
Personally I would use WinJS for the UI layer and to integrate with the runtime (state persistance, app switching etc...), but use a more standard JavaScript library, such as Backbone or Knockout for the bulk of my code to ensure portability.
I use Knockout js and Require js for MVVM. For visual effects, I use jQuery.
My data-main looks like a bit this:
(function () {
"use strict";
var app = WinJS.Application;
app.onactivated = function (eventObject) {
require(["/scripts/knockout"], function(ko){
// My knockout viewModel and data binding goes here
});
};
app.start();
})();
If you prefer Backbone in stead, I guess the setup would be similar.

Standalone video control example for Google TV jQuery Library?

The jQuery VideoControl is documented here:
https://developers.google.com/tv/web/lib/jquery/#gtv.jq.VideoControl
It takes a set of VideoParms. That are not specified.
It is used in the sample templates on this page:
https://developers.google.com/tv/web/docs/gtv-templates
I've taken apart the templates, but I'm having difficulty creating a simple example of a standalone video control. In the templates, the sidenav and carousel code are tied to how the videocontrol works. There is a relationship between the keyController and behavior (behaviorZones) that I can not find an explanation for.
Is there a standalone example somewhere? What needs to be setup with keycontroller, css, and behavior to get this going?
I'm not aware that there is a standalone videocontrol.js sample but it should be possible to set it up. Most of the necessary pieces are inside videocontrol.js, in particular in the videocontrol's constructor and this function: gtv.jq.VideoControl.prototype.makeControl.
keycontroller mapping is used to handling key inputs and some of the CSS are dynamically controlled within JS so there might be errors if you just rip them apart straight from the Template. You'd have to debug it using a solid tool like Chrome Developer Tools. You can watch tutorials of this tool here: http://www.youtube.com/results?search_query=chrome+developer+tools&oq=chrome+develop&aq=0&aqi=g3g-m2&aql=&gs_sm=3&gs_upl=1972l4015l0l6142l14l11l0l0l0l0l207l1476l3.5.3l11l0
Otherwise please send your error traces and/or code snippet for debugging help.
S