Re: Translating foreign text into html code - help



Garmt de Vries wrote:

Either get a new program for your web authoring work, or get a tool to
change all "special" characters to numeric references.

If he is using a sufficiently new version of MS Word, he could just select File/Save As and select a format like "Web page (filtered)" to get an HTML version, with numeric references. The "filtered" thing or something like that means that MS Word refrains from spitting out most its usual "Office XML" stuff and you get something reasonable like


<p class=MsoNormal><span lang=FI>This is Polish: Wa&#322;&#281;sa</span></p>

That's what a version of Word produced. Of course, the lang attribute it inserts is worse than nonsense. It's partly my fault, since I was lazy and didn't set the language in Word. If I paint the text, set its language to English, then click on the Polish name and set its language to Polish, and save as above, I get (here I quote a little more):

<body lang=EN-US>

<div class=Section1>

<p class=MsoNormal>This is Polish: <span lang=PL>Wa&#322;&#281;sa</span></p>

</div>

</body>

Not bad. The class attribute has of course no effect per se, and it might even be useful at times. Some day someone might wish to use some styling for paragraphs generated using MS Office software, and the class name MsoNormal is in practice a rather reliable indicator.

Setting the language to Polish has hardly any noticeable effect at present, but it's still the right thing to do. (I guess the most probable situation where it is useful is when someone opens the HTML document in MS Word or some compatible program, which recognizes the lang markup and uses this information in its spelling or grammar checks. Somewhat deceptively, my version of MS Word has no such checks available for Polish, so anything I claim to be Polish will "pass", i.e. will not be flagged by MS Word.)

.



Relevant Pages

  • Re: ASP.NET Internationalization bug?
    ... My use of language and culture in ASP.Net is a bit different than most. ... Specifying Language in XHTML & HTML ... ASP.NET Web Server Controls Overview ... declarative attributes should render to the browser after I add ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET Internationalization bug?
    ... I don't see too clearly the purpose of declaring a single language for a web page. ... First, you are referring to the XML standard, which is not as appropriate as HTML and XHTML standards. ... Any HTML element on a page can be converted to an HTML server control by adding the attribute runat="server". ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET Internationalization bug?
    ... Let's pause this discussion until the "bug" you reported is explained by the VS Dev team, ... My use of language and culture in ASP.Net is a bit different than most. ... I have already found, first-hand, that the better of the major search engines use the cc TLD *and* the HTML ... I don't see too clearly the purpose of declaring a single language for a web page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET Internationalization bug?
    ... Let's see what Microsoft's VS bug team says about the bug you filed, ... My use of language and culture in ASP.Net is a bit different than ... I don't see too clearly the purpose of declaring a single language ... appropriate as HTML and XHTML standards. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Word 2004 has lost my Autocorrect preferences
    ... A little out of my realm here as I really don't work with varying language ... but what if you use the OS X Character Palette rather than Word's ... the Polish alphabet isn't an English alphabet, ... However, Word 2008 has a new Preference: Edit>Match Font with Keyboard, ...
    (microsoft.public.mac.office.word)