I'm trying to have a multi language website in rails.
So I added the google translate from here
I added the meta script to my application.html.erb so that my whole site is translated.
And the div to my index page only.
But it just translates the index page and not the whole site. When I open the links in the index page they don't get translated. I don't want to add that div to every page in my site.I read this stackoverflow sloution here but that is not working for me. Suggest a solution.
I'm also aware of the Rails I18n library for internationalization but I guess I need to write all the translations myself manually, which I don't want to do.
Can I18n be automated like Google translator?
Are there any alternatives to that which work in fine in Rails?
You have to add the Google translate plugin code to every page or to which ever page you want to make it work .
Related
I just finished my website : http://www.kiffetescourses.com
This website is made with angularjs and the meta title and description are updated by angularjs like this :
title ng-bind="page_title"
meta name="description" content="{{ page_description }}"
I use HTML5 pushstate
On google webmaster tool, when I explore my website as google, the screenshot returned has content created by angularjs app.
But when I look on google :
https://www.google.fr/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=site:www.kiffetescourses.com
I notice several issues :
Title and description do not appear on search result and angularjs expressions appear...
Google do not follow links on the home page (in footer)
What I did for ajax SEO :
Add meta content="!" name="fragment"
Any idea what I did wrong?
thank you
Search engines cannot run javascript so if you're using angularjs to load your contents all the search engine will see is the page with the bindings like that are not rendered. In order to make this search engine compatible, you need to dish up a version that already have the javascript compiled. Fortunately, there is a guide for this using node/phantomjs to compile copies of the pages in the backend server for the search engine to read.
http://www.yearofmoo.com/2012/11/angularjs-and-seo.html
I have found the following site on google: https://ga-dev-tools.appspot.com/demos/embed-api
Telling me about the Google API Demo.
Now how do I implement these things in a page in Rails, this is not clear to me.
What we want is to show a few "Dashboards"(Page views today, etc ..) in Rails Admin or a Separate page in Rails.
It's a Javascript library, so you would create new a view and paste some HTML and JS into it. You'll have to make sure it works with your application layout. The Embed API - Getting Started guide shows the code to get a dashboard up and running.
I am starting a jquery mobile/phonegap application. And would like to know if there is any way I can keep my code in seperate files so it is easier to manage. From all the reading I have done on jquery mobile it looks like all of your pages are in one file and are just seperated by divs like <div data-role="page" id="page-one"></div>. I guess I could try to make some type of a makefile that concatenated them all together, but it seems that most apps are pretty lengthy that they should have a solution for this. Keeping all the code in one file just seems impossible to maintain.
JQuery demo, three pages, all one source file:
http://demos.jquerymobile.com/1.1.0/docs/pages/multipage-template.html
You can just use normal links with jQuery mobile:
http://demos.jquerymobile.com/1.4.0/navigation/
It will "hijack" the link and use transitions to give you a native like animation. As Flatlineato pointed out you need to make each page confirm to the required markup, and you'll need to repeat your headers/footers etc on each included page.
Or you can use more complex solutions to dynamically change the content of your page, which can be stored in multiple files, like this other SO post:
including the header and footer in jquery mobile multiple page site
But I would also agree with Leo and say the jQuery mobile isn't the best choice for Phonegap, it's not that well optimized, and runs slower in the Phonegap webkit view than it does in native safari.
I've also switched to a custom navigation system and dropped jQM early on in my Phonegap development, but that was over a year ago, more recent versions may work better.
I think my personal API is what you are searching for:
https://github.com/charnekin/api
Demo example:
http://yopo.es/cordovapi/
jQuery Mobile allows you to have the pages in separate files. Obviously in each file must conform to the structure of the markup pages.
To point to another page in the link instead of the id you specify the correct file name. If the file then you enter multiple jquery mobile pages must also specify the id.
I inherited the management of a Symfony site and need to add some HTMl form tags to one of the "static" pages via the CMS. The scenario I have is:
/index.php/splash/welcome pulls up the welcome screen.
We want to be able to add a subscription button on that page.
The HTML has been supplied for us by the company that handles the subscriptions.
The form post method has an action that references a script on a remote site (no lectures on the security implications please ;-).
When I add the <form... and <input... tags via the CMS admin panel, the tags get removed automatically by Symfony.
Is there a way to tell Symfony to allow these tags?
Thanks in advance,
Marty.
This is goign to depend completely on how the developer set up the CMS. Youre using a rich text editor in source mode i would take a look at that editor's config file and documentation because its probably the one responsible for stripping the tags.
If its just a plain text area i would check the submit action for the edit form and take a look at the code... he may be using something to strip them in there.
If youre using one of the Symfony CMS plugins (Diem, Apostrophe, Sympal) i might be able to help further if i know which one youre using. If its something custom we would need to see the code. This isnt really indiciative of the Symfony core, but rather the CMS youre using.
I am using the default Links module to create a list of links in DotNetNuke.
So I have added the module inside the page and gave a title of "Links". Then I have added two links pointing to page of my site (Link 1 and Link 2).
Now I would like to translate the page and its modules to another language. I have been able to translate everything on the page except the title of every link inside the module (Link 1/Link 2).
Is there a way to accomplish this? Am I using these features in the correct way?
Generally speaking, is there a way to localize DNN standard modules?
A bit late but might I suggest the ealo text html module. This might be the solution
With core localization features (as of 5.6) - when you localize a page you are effectively making a copy - and the intent is that you localize the text in the module on the second page manually - meaning that you physically update the second links module's text/links etc.