How to tell Google to not translate some text file in a text file? This is my sample text file:
"hp1": "Swipe to the right to reveal the left menu.",
"hp2": "(On desktop click and drag from left to right)",
"ht": "Welcome",
"TITLE": "Welcome",
"name":"Gowrisankar Reddy"
google converting above one like this
"hp1": "ఎడమ మెనుని బహిర్గతం చేయడానికి కుడివైపుకు స్వైప్ చేయండి.",
"hp2": "(డెస్క్టాప్ క్లిక్ చేసి ఎడమ నుండి కుడికి లాగండి)",
"ht": "స్వాగతం",
"TITLE": "స్వాగతం",
"పేరు": "గౌరీశంకర్ రెడ్డి"
I don't want to convert "name". How can I do that?
I am not using HTML, using text file only.
Thanks.
I am using google translate not used any code
Google Translator can normally skip translations by HTML tags with class notranslate.
But since it has a built-in html parser, as a hack, you can pretend one or more words are a tag.
<name> will not get translated
Another hack is to capitalize NAME
Related
I am trying to translate a text thats inside a map field.
This is how the collection is set up. I want to translate the "Text" field.
I tried "test.textDoc.*.text", but "dot notion" doesn't seem to work. I even tried "test/textDoc/{random}/text".
For the Translate Text extension to work, the text to translate has to be in a known, fixed field in your document. In our example, that'd be ocnuwen.text, but the ocnuwen cannot be variable.
Keep in mind that Firebase Extensions are open-source, so you can use the source code of that extension as a template for your own - and tweak it to your needs.
I am working on a project in asp.net MVC which involves printing various information that the user enters previously.
I use the TinyMCE for comment type fields.
As we know Tiny allows you to format text using different types of fonts, adding bold words, etc.
The string it produces will have tags that allow reading the style chosen for the word or phrase in HTML.
I use Itext7 to produce pdfs, when I print the fields I mentioned above, obviously all the HTML tags are shown, for example:
<p> Hello World! </p>
Is there a way to tell Itext7 that when these tags are present, it must use an associated style for that tag?
I created "Hello World" here and used bold, italic and underline. Copy the source code via "Tools" and just use the following code to convert it via iText7:
String htmlString = "<p><span style=\"text-decoration: underline;\"><em><strong>Hello World</strong></em></span></p>";
HtmlConverter.convertToPdf(htmlString, new PdfWriter(destinationFolder + "test.pdf"));
The resultanting PDF:
Atom is a hackable text editor but I can't find a way to hack it to my needs.
On PC I use Notepad++ and its custom highlighting engine to view very large log files with visual cues to assist me.
I want to be able to highlight individual lines in Atom based on their contents: say the line contains "warning" I want it to be orange or "error" - red.
Atom is build on web technologies, so you can use JavaScript and CSS to alter its behaviour. If, for instance, you type "Warning" into a plain-text document and open the Developer Tools, you will see it is rendered as plain HTML:
<span class="text plain">
<span class="meta paragraph text">Warning</span>
</span>
Unfortunately, there are currently no CSS selectors for the text inside a tag-pair, so you would have to create a plugin, or package, in JavaScript/Coffeescript. How to CSS: select element based on inner HTML) provides a good starting point.
Use JavaScript to detect all instances of “Warning” inside the HTML of the editor view, then add a class. You can then use CSS to highlight the line.
Alternatively, you could probably create custom grammar for your log file.
In my asp.net website I have a HTML page which contains some words with Superscript, for example the HTML representation is as below...
ABC<sup>def</sup>
when it is rendered in browser it appears like this : ABCdef
I have a export feature which export the HTML document to a word document. When I am exporting it is being exported as ABC<sup>def</sup> in the worddoc.
I have been trying to do it using some kind of regex html = html.Replace("<sup>", "\"");
but that doesn't help.
Can anybody please help me how would I make it appear as ABCdef in my word document too using asp.net?
This is an older question but I've been trying to do the same thing in reverse. The problem is with how Word formats and defines its super and subscripts.
There are no tags that Word used to define super and subscripts, it uses relative positioning and font-size declarations to generate symbols that look like super and subscripts.
Unfortunately there is no reliable regex to turn Word's positioning into super/subscripts, and there is no way to regex a document with those tags to make Word recognize them.
When I am adjusting content, I click on the source I want the html to be in an uglified state, so it is easier to naivagte, without having to copy and paste the html into HTMLLint, then into Sublime Text (at least once for editing, but definitely in ST2 if I plan on doing several iterations of edits), and then back into the RTF body area.
How do you get it to show the source in an indented view like this:
Maybe also how do you just edit the content in HTML format only? Any Module?
How do you get it to show the source in an indented view
Well, you can't unless it is built into the Rich Text Editor module that you have installed. CK Editor, for example, does indent the HTML nicely.
how do you just edit the content in HTML format only? Any Module?
If you want to edit the content without the Rich Text Editor, you may
disable that particular module admin/config/modules
or make plain text your default by going to admin/config/content/formats and dragging 'Plain Text' to the top of the list.