Internationalization in Liferay 6.2 Alloy UI - internationalization

we are developing a site in which we have to use internationalization concept for describing the web in different languages(18). I already translate my labels of text box and etc but I am fail to translate the label of buttons and also we have one navigation bar in which seven different pages links are present. How to change this navigation links.
Here how to translate these into different languages. I am using Liferay 6.2 Alloy UI.
Thanks and regards
asif aftab

Liferay provides a built in internationalization integration with Alloy UI.So for Internationalization in <aui> tag you simply have to do :
<aui:input name="helloWorld" value="anyThing"/>
And it automatically internationalize name field of <aui> tag converting it as Hello World <label>.And if you want to provide custom for tag you need to use
<aui:input name="helloWorld" value="anyThing" label="edit-button"/>
and define edit-button in Language.properties.
However for normal <html> tag this method doesn't work.And I assume that your are using <a> tag for your navigation. For providing internationalization in such tag liferay has provided a method.
<liferay-ui:message key="title-home-navigation"/>
and define the key in Language.properties.
So you could use it like :
<h1><liferay-ui:message key="title-manage-organization"/></h1>
<a href="${homeButton}" ><liferay-ui:message key="title-home-navigation"/></a>
for achieving internationalization feature in such tags.
I hope this help your cause.

Related

How to create a simple webpage using Oracle WebCenter Sites

I am new to WCMS. I need help in creating a brand new website using Oracle WebCenter Sites with more customization.
I have created the templates and pages. How do I use the assets and call the page attribute and its value in the templates?
How do I render the templates?
How do I use the assets and call the page attribute and its value in the templates?
You have to load the page asset itself first so that you get all the attributes and later you can load each attribute and display their values respectively.
<asset:load name="anyName" type='<%=ics.GetVar("c")%>' objectid='<%=ics.GetVar("cid") %>' flushonvoid="true" />
<asset:scatter name="nameAssignedOnAssetLoad" prefix="asset" />
<ics:getvar name="asset:attribute_name" />
Above code snippet loads the Page asset and now you can load individual attributes using asset:load tag (if they are basic asset type attributes) or assetset:setasset tag (if they are flex asset type attributes).
If you are more comfortable with Java, you can use OWCS Java API and follow these steps mentioned in Developers Guide
How do I render the templates?
To render a template you have to use render:calltemplate tag with appropriate attributes. This tag invokes your template, basically the code/logic that you have written within the template.
As you're new to OWCS I will suggest you to go through basic examples of read and write as mentioned in Developers Guide, they will help you a lot.
Oracle has dedicated OWCS Community wherein your queries will be answered must faster!

How to using ckeditor in Odoo

I expected integration CKEditor use for fields.Text() into Odoo application instead using default text field of Odoo.
You Can define by just fields.html , but make sure you are developing in only V8, because CKEditor is removed from V9.
You must have the ckeditor module installed and the field should be html fields:
body_html = fields.Html('Rich-text Contents')
You can also use a widget. Check the documentation of the module:
In your view definition, use widget="text_html" if you need just html
display. In the unlikely case you need specific features of ckeditor,
use widget="text_ckeditor4".

KendoUI Mobile with asp.net mvc

Is it possible to do a KendoUI mobile project, using ASP.net mvc? Watching the introduction on Pluralsight, I'm sort of confused. As an example, KendoUI Mobile uses something like this to navigate:
<a href="#someView" data-role="button">Go to some view</button>
When rendering views through RenderBody in my main layout, will I have to specify this view as a mobile view, or does the application defined in my main layout pick up on this?
So, I guess my question is this; Has anyone got any experience on this combination and, if so, could you provide some resources as to where this combination is being used?
I figured this on out. Seems to be a few projects out there using this combination. One example is this project: KendoUI mobile task manager
That being said, I'll try to play around and tweak the framework to my needs.
The answer is Yes. I was searching for the same answers, and found this resource very helpful, using MVC4, with detailed explanations:
Single Page App using MVC and Kendo Mobile
When searching for references and tutorials, what is not immediately clear is that Kendo UI Mobile is a different setup from Kendo UI. As WhizKid points out it is a single page application, and all your data must go through AJAX.
If you have not used them before, you will probably need to learn Kendo's MVVM and datasources. You must decide what sort of interface you will use for data exchange (eg. WebApi, OData) and fix the routing.
The reason I am going this way is because Kendo comes with good looks, and MVC can help me with localization.

Optimizing Spring / Hibernate project for mobile devices

I have to optimize a Spring / Hibernate project (which was created without keeping mobile devices in mind) to be viewed in mobile devices such as iphone.
This project uses Spring MVC tags in the front end. Is it possible to attach a mobile friendly renderer to Spring MVC? (it is possible in JSF)
Otherwise what are the options available to me?
(My intention is to provide a mobile friendly UI for the existing project without changing the backend)
Spring MVC doesn't have tags for UI components that could be rendered differently. It just has low-level tags to render form fields, and messages.
If you want specific pages for the mobile app, you'll have to tweak the CSS, and/or rewrite the pages. It can help you with its support for themes, but you won't find any magic wand that converts an HTML page and give it mobile-friendly aspect.

MVC sitemap provider & css styling

Does anyone know how to customise the rendering of the MVC sitemap provider so my ul element has a specific css class?
Try MvcSiteMapProvider hosted on CodePlex. You should be able to fairly easily migrate your existing Sitemap file to the slightly different but essentially compatible format. This will give you the ability to output your sitemap using the simple Html.MvcSiteMap().SiteMap() helper method.
The source of the project includes the default templates which you can edit to produce any rendering you like...or just pass in the name of a template in accordance with MVC convention. The model types you'll be rendering are SiteMapHelperModel, SiteMapNodeModel and SiteMapNodeModelList (namespaces removed for terseness).
I appreciate this may not be exactly what you're after as it relies on a 3rd party tool but its a useful project that supports much more than just rendering sitemaps. You'll want version 3.0.0 for MVC3.
Dan

Resources