how to implement page translater [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Hi I have developed a site,but now i required to add a language translator in my site. how to add a language translator to translate all content of my site to a desired language dynamically.help me to solve this

You should not use any translators that do this operation on fly. Remember that translators are your enemy when translating more than one word. Especially when both languages are not english. Secondly this could take many processing resources and without caching it, it will blow up your network.
To do it right, you should apply i18n feature to your site. This will require from you:
replace any labels on your site with i18n tags with i18n keys
create i18n property fields holding translations for each i18 key
change of language will require page reload
when displaying content (taken from database or the source), you should create content per language, and select it basing on Locale from Request
As you can see, creating fully multi-language app is not a walk in the park, it is hard work.

If you want to provide your website content in different languages, you will need a localisation service (depending on the size/scale of your site) or use an API such as Google Translate's API, which is not free. See Beri's answer on performance implications.
You need to do a bit of research yourself and see which solution suits your needs. We don't have much context on your site, so it's a bit difficult to answer.
This answer may be relevant to you.

Related

How to pull reviews from an outside website that does not have an open API? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 days ago.
Improve this question
I'm in need of automatically getting reviews from a job posting page for my client. The problem is that it's a medium sized, local website without a public API. Are there any ways to automatically update your website based on information from another website? It'd consist of rating, name of reviewer, message + date
A library like Puppeteer is a premium choice for this if you're wanting to stick with Node.js. When you scrape just be sure you consider the website's Terms of Service that you're scraping - but I've used Puppeteer for this purpose and it's generally very simple and convenient.
You use DOM selectors as you would with Javascript and then can grab text or metadata attribute values wherever you want.
Then you just need to be careful with how you run these crawlers to not abuse the website. One crawl per 1-minute is probably a minimum if I were to guess but it's up to you!

How to pin a website to windows taskbar programmatically using javascript? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I can't use drag and drop method. I have gone through the jquery pinify plugin, but what I understood is that, it only encourage user to pin website using drag and drop using intelligent popups rather than doing it on it's own.
Is this even possible?
No luckily this is not possible.
Imagine the security reasons behind it. No website can change something on your OS. (At least that's what we all hope, that's why I say "luckily" we have a problem if this would not be like so).
Or imagine this: You create a website. The font is defined by designers and project managers which discussed which font and which font-size will be the best to represent the company on the web. So you created the website based on those requirements. But now, I have some issues with my eyes. This is why I setup my browser with a default font-size. This is what I need, to read any content from the web. Now, NO! You can not change this! Why? Because I have set something in my browser settings, also those are part of my "personal" settings. You can not look into them and you obviously can not change them. Hope this helps.

What do <div class="masthead pdng-stn1"> and <div class="phone-box wrap push" id="home"> mean? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am new the css front-end programming, I am applying the css into my web pages, and using bootstrap, but I found that a sentences described as the title, I don't understand the meaning of "masthead pdng-stn1" and the meaning of "phone-box". I can't find the definition of them in the bootstrap.css and all of the css files in my folders, but they can't be deleted otherwise the web pages can't display properly, please give help, thanks a lot!
Welcome to StackOverflow! I would recommend browsing the How to Ask a Good Question documentation. That said, generally "classes" are just a way to group/categorize elements on a page and apply like-styles to them. pdng-stn1 is clearly a poorly thought out name, and whatever it means would have made more semantic sense, like pudding-stain1 or whatever. They're not necessarily related to Bootstrap in any way. masthead is often synonymous with header or page-top, something like that. You really just need to dive through the source code, or read the documentation that comes with whatever frameworks your website is using.
If you'd like you can read up on the basics of CSS Class Selectors. They're essentially entirely arbitrary and are chosen based on the current developer's needs and desires for structure, or for integration/semantic similarity with the current framework.

How to convert web site language into user selected language - React JS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have developed a site with React js in English language but I want to have the feature of changing site language to user preferred language. How can I achieve this?.
There are some good packages for achieving this, you can try out i18n-react or react-i18next both packages offer a good way of adding internationalization to your site. I like the later and according to their documentation achieving this would be like this.
<div>Just simple content</div>
to
<div>{t('simpleContent')}</div>
Where simpleContent is the defined key in the i18n file which has different translations, so you can give the user the option to choose a language, which would change the component's language based on the selected language, to achieve this you need a more concrete setup, check the documentations on the above links.
a better library I'll suggest will be the i18next. it's quite straight forward and easy to implemente:
brief explanation here: https://dev.to/ksushiva/how-to-translate-your-react-js-app-with-i18next-12mn
official doc: https://www.i18next.com/overview/comparison-to-others

What is the best practice or framework for making slides using html? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have seen some cool slides in html, but some are CPU-consuming or browser-dependent.
Since I am not very familiar with html5, I'd like to know what's the best practice or existing framework of making html slides.
And here is a more creative one similar to Prezi: http://bartaz.github.com/impress.js
Here's an excellent little "framework" for making HTML slide presentations, with animations, transitions and such.
Link: deck.js
I love it!
There is a great list of such presentation templates:
https://github.com/geraldb/slideshow/wiki/More-Slideshow-Projects-in-JavaScript
I found deck.js to be the best compromise between:
simplicity: you write the html and launch it in your browser, no need for a web server
customization possibilities thanks to the themes and clean structure letting you create your own CSS style easily
functionality with the extensions
possibility to print usable handouts
Keydown is a good alternative which uses deck.js and markdown language to write the slides but requires ruby to create the html.
The two options, I can recommend are following
Nivo Slider : You can hard code the images and links
Agile Carousel : Have the option to set it against some server script for rendering output
Use this library to make interactive presentations, stories or ads.
BoardJS

Categories