does TinyMCE supports other languages to compose HTML emails? - asp.net

I have used Tiny mce once in a asp.net project and found it a very nice tool.
Here is requirement of composing HTML emails in languages other then English (Spanish, French, German and Arabic) in asp.net project.
Kindly guide me does tiny mce support languages other then English ? Is it something tiny mce should be supporting or something will be required on client side to be installed ?
Thanks for your time and sharing.

You need to add on the html generated part from this editor, a header that says the language that the text are, just like you do on html pages. Then you add this html text to your html part of your email and send it.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=LanguageEncodingCode" />
<body>
.............. paste here what you get from this html editors.............
</body>
</html>

Related

Advanced iframe solution from external source

Oki, I got my head on the table here.
I'm trying to get contents from another page, and interact with it. Using some kind of advanced iframe solution.
Up until now I've been using the ugly iframe solution, you can see the results here :
http://www.mosfellsbaer.is/stjornkerfi/stjornkerfi/fundargerdir/
Please try to interact with it to see how ugly this is.
Ok..
I found another page that uses the same system as we do, but it looks a lot better.
It's an iframe, but when looking at the source code, I dont see any iframe embed code or anything that points to that it's an iframe. Here is the page :
http://www.kopavogur.is/stjornsyslan/fundargerdir/searchmeetings.aspx
But I know this is some kind of an iframe.
Their way is a bit better because they can use their own css and such.
Somehow they get the contents from the searchmeetings.aspx and post it to their page
How the h... are they doing this ?
I'm kind of new at this here
Thanks in advance
It's not an iframe... Looks like they're doing something like this: How to display an ASPX in another ASPX's DIV dynamically at runtime?
It's an ASP page, and the inserted document has a few clues telling us that it's a Microsoft generated page as well:
<div class="boxbody">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Leit í fundargerðum</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<link href="css/fonts.css" rel="stylesheet" type="text/css">
</HEAD>
<body>

Formatting Text in Resource file

I have a site that sends a variety of different emails. these are stored in a resx file. (The emails are sent as text not html, or else I suspect that what I am asking would be a lot easier)
I have now been asked to make some of the text in one of the emails bold. so that, for example I can have
We can accept your decision now... instead of We can accept your decision now...
I have tried creating my formatted text in word, and then cutting / pasting it into the resource file, but that strips out all the encoding.
Is there any way of storing formatting within the file, or do I need to rethink my approach? (In which case, I guess I either split the email into fragments, and when I am assembling the final string, I apply a font style to the relevent fragments, or I store my formatted emails in files and folders, and load them as required.)
You should insert HTML in your text , "<b> We can ac...</b>" will result in bold text in the receivers end.
If you don't want to use a HTML format, you should create your email in a RTF format. It is not possible to bold your text if you are sending just a plain email. How to send it depends on the library you use for sending emails.
I've sent a RTF formatted email (with normal and bold text) from MS Outlook 2013, and the source code looks like that (similar like in HTML):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<META NAME="Generator" CONTENT="MS Exchange Server version rmj.rmm.rup.rpr">
<TITLE>Test</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">We can accept your decision now...</FONT></SPAN><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="pl"><B></B></SPAN><B><SPAN LANG="en-us"><FONT FACE="Calibri">We can accept your decision now...</FONT></SPAN></B><SPAN LANG="pl"><B></B></SPAN><B><SPAN LANG="en-us"></SPAN></B></P>
</BODY>
</HTML>

google plus doesn't show meta information snippet from xhtml documents

I have been fighting with this for some time now, but I cannot figure out even a why it doesn't work. Take this simple XHTML test source:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>foobar</title>
<meta name="description" content="baz" />
</head>
<body vocab="http://schema.org/" typeof="Article">
<h1 property="headline">Some title</h1>
<p property="description">some arbitrary text</p>
<p>and even more of it</p>
</body>
</html>
(for testing with google plus, this is also temporarily available here, and here you can find the plain html version)
If you paste a link to the XHTML version to g+, you'll find that it's unable to parse it at all. It will just show the link. The HTML version however seems to be parsed. Both parse well in the rich snippet tester from google. Even more, we have evidence indicating that our XHTML websites rich snippets are used in googles search.
The content type is announced correctly as application/xhtml+xml for the xhtml version, and I cannot figure out any other problem. I already tried to leave out the xml-declaration and use a XHTML 1.1 strict doctype, without any success.
So my question(s):
Why doesn't g+ show a snippet at all for this file in XHTML version, even though facebook does?
Can this be corrected somehow, without dropping XHTML, and if so, how?
I guess the parser g+ uses might not support XHTML, and possibly bails out if it can't handle the application/xhtml+xml MIME media type. Last time I heard the g+ and Google Rich Snippet testing tool were not using the same toolchain, so it's quite likely that something that works in the Rich Snippet testing tool might not work elsewhere, though it's a good sign if it works in the testing tool. I would think that in the future Google would align all their products with the capabilities of the rich snippet testing tool.
Do you have any specific reason for using XHTML as opposed to HTML or HTML5 served as text/html?
The microdata from your example doesn't appear to be in the expected format. You can generate the necessary microdata at: https://developers.google.com/+/plugins/snippet/
Notice the missing itemprop, itemscope and similar attributes:
<body itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">Shiny Trinket</h1>
<img itemprop="image" src="{image-url}" />
<p itemprop="description">Shiny trinkets are shiny.</p>
</body>

asp.net text messed issue

First of all take a look at website www.elcieloessalud.com/Tratamientos.aspx
I have built this website for a spanish client of mine, it is built in .net framework 3.5
issue is that i have a cms kind of page that allows me to change text of the pages etc.
when changed, text appears perfect in rich text box but page appears messed up. as you can see in the above page lots of aquí,Salvación ,Dios…†etc.. although it should be something like aquí,Salvación,Dios…”
Any help in this help would be appreciated!
Regards,
Umair
Include this on your html header part
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
If you page is not on utf-8, then I suggest to render it on utf-8, or find your charset for your Language and set it. The charset must be the same as your file to have correct render. In the visual studio you can see your char set of your file on the menu: File | Advanced Save Options... In some friends of me this menu is not exist, you can add it on the Tools | Customize. (for more details for how to add it search on internet - there are a lot of info.)
Also you can try to set on web-config (or set your language)
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
Finally i did it :) with help of #Aristos as well!
we need to include
meta http-equiv="Content-Type" content="text/html; charset=utf-8"
in all the pages including masterpage and change charset of language to whatever yours is
and when creating the streamwriter to write we need to indicate the encoding there as well as below
Dim sw As StreamWriter
sw = New StreamWriter(FileName, False, Encoding.UTF8)
and you are done !! :)
happy coding

Can I translate my website with Google Translate?

I have a web page created in English. Depending on the
continent, I want to dynamically translate my whole webpage to another
language.
The webpage is fairly complex, so I cannot do it string by string. I just want to do it in a way like at the time of loading it will get translated into desired language.
Can I translate my webpage using the Google Translate API?
Here is an example to to add Google translator to web page to translate specific element:
<html>
<head>
<title>My Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="translate">Тестирование</p>
<div class="translate_control" lang="en"></div>
<script>
function googleSectionalElementInit() {
new google.translate.SectionalElement({
sectionalNodeClassName: 'translate',
controlNodeClassName: 'translate_control',
background: '#f4fa58'
}, 'google_sectional_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=en"></script>
</body>
</html>
http://jsfiddle.net/maxim75/H3Wkr/ - working example
You could add a Google Translate widget to you page and users can translate to their language of choice on demand. http://www.google.com/webelements/#!/translate
By visiting google translate tool it generate a code that you add in your website.
It's also possible directly by using a url
http://www.google.com/translate?sl=XX&tl=YY&u=http://www.trial.com
where xx is the original language, yy the language to translate...
Maybe my tutorial will be helpful: google translate.
Yes, you can. See Google Translate API documentation here: http://code.google.com/apis/language/translate/v2/getting_started.html
Note that automated machine translation is, as of 2011, not an adequate match for human translation, so don't expect that the translated text will be perfect - it will probably be understandable with effort, but it will be obvious that it's machine-translated.
Probably you can use microsoft translator API.. you can find the implementation at
http://code.google.com/p/micrsoft-translator-php-wrapper/
and you can see the demo also
http://renjith.co.in/translate/

Resources