Multi language support for website - c#

I am building a website using Asp.net with C# and back end support is SQL server.How to add multilingual support to it?Like in google or facebook there are various link button for various languages?I want to implement the same thing.Please help.Thanks in advance.

Google and Facebook employ the help of translators to produce their various language features. This is a process called localization is often a very complicated and difficult process. If you are working by yourself, I would be wary of actually doing your own localization unless you are a native speaker or are fluent in the languages you want to translate your pages to.
If you would like users from around the world to be able to use your page in their native language, you may consider placing a link on your site that uses Google Translator or another translation service to convert your page text for you. It is not a perfect solution, but may help you get up and running.
If this doesn't suit your needs, you will need to do the localization yourself. I'm no expert on the process, but there is a simple pattern you can follow. Take blocks of text on your website and translate them into the different languages you want to support, and depending on which language the user specifies in their preferences, pick that block of text that matches that language.
This Wikipedia Article may help you better understand the processes and the complications that are involved.
This MSDN Article discusses best practices and tips for doing localization in ASP.net.

You'll have to define somewhere all text and choose on a request the language you want to use.
Translating and maintaining translated texts is a non trivial task, maybe String | Create a multi-language website or app will help you a lot.

Related

Hide sections in a word document based on users responses to a series of questions

I'm looking for the best way to achieve the following workflow.
Ask a series of questions
Captured the responses
Use the answers captured to either hide or show certain aspects of word document.
Save the complete word document to a location (TBD).
I'm not a developer, so will need to source one who could pick this up, but before I do I wanted to know the best approach to this workflow.
Appreciate any feedback you can offer.
Cheers
There are several libraries for interacting with Word (.docx) documents in C#, such as NPOI and DocX, and it is not theoretically complicated to programatically populate a document based on user input and some decision tree and then save it somewhere locally or expose it for download via a web interface. But, keep in mind, that's only part of the solution -- apps have to be hosted, secured, monitored, etc., and that's where the "hard" part is likely to be.
If you are looking to accomplish this within an enterprise environment that uses Microsoft Office 365, you may not need a developer at all. Microsoft Flow / Microsoft PowerAutomate allows you to produce complex workflows such as the one you described. There's a very similar one listed here:
https://flow.microsoft.com/en-us/galleries/public/templates/3c651e28cded46aab2ba40a2c3116f30/create-word-and-pdf-documents-from-microsoft-forms/

Best way to collect information from web page

I need to get information from couple of web sites . For example this site
What would be the best way to get all the links from the page so that the information could be extracted.
Some times need to click on a link to get other links inside that.
I tried Watin and I tried doing the same from within Excel 2007 with Web Data option.
Could you please suggest some better way which I am not aware of .
Ncrawler might be very useful for the deep level crawling . You could also set the MaxCrawlDepth for specifying the same.
Have a look at WGet. It is an incredibly powerful tool for mining the content of a single page or an entire website. The options available allow you to dictate how many levels deep to follow in terms of links, what to do with static resources such as images, how to handle relative links, etc. It also does a very good job of mining pages which are generated dynamically, such as those served by CGI or ASP.
It's been around for many years in the 'nix world but executables compiled for Windows are readily available.
You would need to kick it off from .NET using Process.Start but you could then pipe the results into multiple files (which mimic the original website structure), a single file, or into memory by capturing standard output. Then you can do subsequent analysis such as extracting HREF HTML elements (if it is only links you are interested in) or grabbing the sort of table data evident in the link you provide in your question.
I realise this is not a 'pure' .NET solution but the power WGET offers more than compensates for this, in my opinion. I have used it myself in the past, in this way, for exactly the sort of thing I think you are trying to do.
I recommend to use http://watin.org/. This is much simpler than wget :-)

Detect the language of a text is english in PDF or DOC files

Requirement is that i want to identify that the text written in PDF or Doc is english or non english. if i got a single word of (turiskh, french,arabic and etc.) have to avoid the whole documnet
its urgent plz give me sample code for this functionality
Have a look on Google Translate API, only free service who could do this for you what I know. Otherwise I can only see the solution of having your own dictionary etc.. But thats a different story
I guess you could use LangId. However there are some restrictions:
To use our API in live websites or services we suggest you to apply for a free API key, using the below form. The API key expands your developing possibilities allowing you to do up till 1,000 requests per hour (~720,000 per month).
I don't think this will solve your 'single word' issue however. I believe if the text has 6 words English and 4 words in another language it will see the text as English since that language is mainly used in the file. I haven't looked at the API myself though so there might be some solutions for that.
Hope it is of use to you.
Maybe the detect function of Google's Translate API could help you:
http://code.google.com/apis/language/translate/v2/getting_started.html#language_detect
This is not possible for single words.
Is "the" an English word? Well, yes, but it's also a Danish word (meaning tea). Does the word Schadenfreude indicate a non-english text? Not necessarily, it all depends on the context.
Adding to the list of APIs that support language determination, Bing API has a call that will determine the language for an array of strings.
http://msdn.microsoft.com/en-us/library/ff512412.aspx
Hope this helps somewhat.

extracting nouns,noun phrases,adjectives verbs from text file corpus using visual c#

i am doing a project wherein i have to extract nouns adjectives noun phrases and verbs from text files(.doc) format.
i have a corpus of around 75 such files. i have accessed net to find about it and i came across POS tagging in python using nltk.
as my project is in c# (using visual studio 2008) i need a code to do so.
i have tried wordnet api for the same and even sharpnlp but as i am a newbie i found these tough to integrate with my project.
can anybody please suggest me simpler code to do so using something like vocabulary etc. plz help me guys.
thanx.
I worked in NLP (Natural Language Processing) for an industry leader for a while and what you want to do is no trivial task. I know one of the creators of nltk and I have used it myself; it's a high quality open source tool and I'd recommend you use it (do you have a particularly compelling reason to use C#?)
POS tagging is typically implemented by training a model of language on hand-annotated data, then applying that model to new text, predicting the parts of speech and giving a confidence . nltk has tools that do this, and they also have some models (if I'm not mistaken).
You'll find that most tools are written in C++, Java, and Python. If you don't know any of the languages look at this as an excellent opportunity to learn something!
See Wikipedia, especially the links at the bottom, for more information and other software available to use for such tagging.
Christopher is correct in his statement that NLP implementations are no picnic. However, I've recently looked into a viable solution using OpenNLP in a .NET project with a rudimentary PoS parser. In my example I am looking for noun phrases, but it shouldn't be too difficult a text to find other fragments as well. I find the OpenNLP Tools Models for 1.5 to be sufficient for my purposes.
I realize this answer is woefully late for the questioner, but hopefully it will give others some inspiration with this difficult field to get into.
Extracting noun phrases with contextual relevance in .NET using OpenNLP
Kindly read through this article.
Easy Integration of SharpNLP with C# Visual Studio Project
In this article, I have given a step by step way of integrating SharpNLP with C# project and have given sample code snippets for specifically address your issue such as Sentence Splitting, tokenizing and POSTagging.
Try this out and I will be able to help you with the problems you encounter.

Asp.net webparts or portlet like functionality

What is the best way to let other parties use your website as their own content using their own style ?
We have build a small website for a customer, asp.net, .net framework 3.0. Now the customer wants other parties to be aple to use our website in their own websites while maintaining the styling of the costumers website.
I have done nothing like this before and don't even know what to google, so any help is appriciated.
I know you can do this with sharepoint, but to use sharepoint for such a small site seems like a lot of overkill
it sounds that portlets is a good name for what they want. but googling portlets draws me in the world of java and doesn't give me a lot of info on what the other parties would have to do to make it work.
a simple Iframe would probably take me a long way, but how can you get the styling done within an Iframe
webparts also sound interesting , but they seem more for in project sharing then letting people use them in their own site.
It is a small website and the logic and backend communication is pretty good contained, so a complete rework of the frond-end is not a big problem.
Once again, any help is appreciated !
Omar Al Zabir has a book on how to build a Portal in ASP.NET- here is a link to his Website.
You might want to look at his Dropthings portal.
Yes, portlets are pretty much Java-only, despite any talk of standards.
If you can encapsulate your pages in web parts or user controls, that would make it easy to style them, and even to parameterize them: a web part can be configured.
You can use Kalitte Dynamic Dashboards for creating professional dashboards and portlets.
More information can be found at www.dynamicdashboards.net

Categories