How to give multiple language support in nodejs - angularjs

I have been given a project made in chinese language that uses nodejs, angularjs, and nodejs also provides restAPIs to mobile apps. I am required to give multiple language support in this project. I have planned to make json files for each language and load the file when required. But i am confused if it is the right way to do the project.

See the modules on npm:
https://www.npmjs.com/browse/keyword/multilingual
https://www.npmjs.com/browse/keyword/i18n
There are a lot of them - both specific ones for the framework that you're using and general one to be used in projects independent on the framework.

Related

Angularjs mutlilingual support using protractor

I have been working in Angularjs application and we have already written protractor framework to test. Application need multi language support now, whereas our testscripts are in English. Can anyone suggest me how to add multilingual support for other language in existing framework
Note: we will need the English testscripts for english locale anyways.

Is there javaToJS/jsToJava api similar to Rhino in J2V8?

It's grateful that you provide so excellent J2V8 framework, I'm embedding it for my
project, My project is now using Rhino engine.
I'm facing one problem.
I found there's no javaToJS or jsToJava api in J2V8, but Rhino has this api.
In our project, we use javaToJS to convert java object to javascript object directly,
it's necessary and convenient api for us.
Therefore, would you do us favor to tell us how to convert java object to javascript in
J2V8, or javascript to java.
In our project we have same goal of migration from Rhino to V8.
I have found, that for conversion of V8 objects to Java objects V8ObjectUtils.getValue() could be used. Also TypeAdapter could be used optionally to provide custom transformation rules if needed.
Unfortunatly V8 does not provide ability to convert Java objects to V8 object.
But I have found nice project, which does it - v8-adapter
Also I have added some behaviour to the project, which is similar to Rhino - e.g. read V8 objects as Java maps or V8 arrays as Java lists in Java host objects. As well as some other enhancements. Thus your migration should be easier now. The v8-adapter project is developed actively - feel free to contribute if something is needed.

How can I migrate the existing MVC+AngularJS application to Mvc+Angular4 application

I have an existing application written in mvc5 and Angular1.I want to convert all Angular1 code to Angular4 code. Is there any tool available for migration/I have to do manually.
No, There is no such tool available yet.
You have to create it manually. You need to convert all your pages in components as per documentation
These are few document links you can follow though.
https://www.joshmorony.com/how-to-convert-an-ionic-1-application-to-ionic-2/
https://angular.io/docs/ts/latest/guide/upgrade.html
https://www.codementor.io/angularjs/tutorial/migrating-from-angular-1-to-angular-2
https://vsavkin.com/migrating-angular-1-applications-to-angular-2-in-5-simple-steps-40621800a25b

AngularJS 2.1.0 official scaffold & style?

Google knows best… but they're inconsistent!
The official ng CLI generates a scaffold one way, whereas the official tutorial chooses a different way.
I'm not talking just directory layout, typings.json vs types in package.json choices are also particularly worrisome.
What style am I meant to work with?
Angular 2's tutorial basically just shows the quickest and easiest way to get up and running with the framework. It omits mentioning things that could scare away a potential newcomer to the ecosystem, it is meant to be simple.
angular-cli on the other hand actively incorporates best practices, latest technologies like Webpack 2 Beta and tries to give developers a piece of software to quickly scaffold and develop scalable production apps without worrying about build-tools and configuration.
QuickStart
This is not the perfect arrangement for your application. It is not designed for production. It exists primarily to get you started quickly with learning and prototyping in Angular
angular/quickstart/README.md
angular-cli
The Angular2 CLI makes it easy to create an application that already works, right out of the box. It already follows our best practices!
https://cli.angular.io
See also: https://angular.io/styleguide

JSPs for a simple Project Reporting Web App?

I'm about to start developing a simple reporting tool for tasks in international projects. In a nutshell: using the tool, a project is created, defining team members, tasks, and work packages. Team members will be asked to periodically submit reports on the work they've done (related to tasks and/or work packages). These reports will be stored and accessed trough the tool.
I'll use Google App Engine (client requirement) and its datastore (using JDO). But I want to ask you for advice on the frontend part: JSP looks pretty messy for non Java developers... any other idea???
Thanks!!!
Seems like at the moment it's either java or python. However, you may want to look at Grails. GSPs might looks a little less 'messy'. I'm suggesting Grails based on your description of the project, that I suspect will turn out anything but simple later on. You might end up being glad for the mix of constraints and flexibility that Grails will afford.
JSP doesn't need to be any messier than other similar HTML presentation frameworks, it really comes down to implementation. That being said, it is old Java technology which means it's not being kept up to date, and finding a good single source of documentation is difficult.
If you don't want to use JSP, there are other frameworks you can use, you just need to make sure they're compatible with Google App Engine.
The new kid on the block is the Play framework, and that's a Java MVC framework similar to Ruby on Rails. You can find a tutorial here: http://viralpatel.net/blogs/first-play-framework-gae-siena-application-tutorial-example/
If you're going to use Spring, check out this question: Alternatives to JSP for Spring MVC view layer
For a front end developer, if the code is separated correctly, you won't have to know anything about Java since there shouldn't be any Java mixed in with the HTML. If that's your only worry, then I would just go with JSP to keep things simple unless the team has experience with another technology.

Resources