Notepad++ RTL with LTR text in same line - right-to-left

I am doing Langauge translarion for Website Community.ini file
I have test in english with some codes which is from website
-shared %1$s photo(s) { I just want to translate Shared & Photos in arabic but %s makes a problem, How we can write both RTL and LTR in same line.I have Notepad++ editor.
but results is comming like المشتركة %1$s photo(s)

Related

why does zebra printer output use ^GFA ?

I designed a label in a Zebra Label Designer and outputed the zpl code to a file. All my text is encoded in a ^GFA command which is not useable to me because I want to be able to replace text in the label progromatically. How do I design my labels so that the text is not encoded in the program code?
Make sure you use printer-resident fonts when you add a text field in ZebraDesigner. The printer-resident font names listed in the dropdown box of ZebraDesigner typically start with the word Zebra.

ZPL fieldblock ^FB for unicode fonts

I am using ZQ520, its already supports Unicode and I am loading the font as follows:
^XA ^CWZ,E:TT0003M_.FNT^FS^XZ
I can use the font to print Arabic as follows:
^FO100,50^CI28^AZN,0,25^FD ARABIC TEXT HERE ^FS
It works fine but when I use ^FB with ^FO, the Arabic letters get messed up and gets separated (In Arabic, they are connected), here an example:
^FO100,50^FB200,,,R,^CI28^AZN,0,25^FD ARABIC TEXT HERE^FS
so it seems that ^FB does not support the Unicode font. on page 187 of the manual its mention this
The ^FB command does not support complex text. For complex text
support, use ^TB.
And 179
The Field Block (^FB) command cannot support the large TrueType fonts.
Is there a way around this? Because Arabic is right to left, so I am trying to make the text right aligned and multi-line as some strings are long.
I managed to print out word wrapping Arabic text using ^TB using the following code. It may be useful to adapt for your own purposes.
^XA^LRN^CI28^CWZ,E:TT0003M_.FNT^FS
^FO600,10,2
^AZN,50,40
^TBN,600,100
^FH
^FD
arabic text here
^FS
^PQ1
^XZ
Useful links:
TB command (some extra info compared to below link): https://support.zebra.com/cpws/docs/zpl/TB_Command.pdf
Please note that it states the ^TB command must be issued after any ^Ax (font selection) command
ZPL Manual: https://www.zebra.com/content/dam/zebra/manuals/en-us/software/zpl-zbi2-pm-en.pdf

Highlight other language word or letter in MS word file

I need to know can we make a apple script that can highlight other language text or word or paragraph in the .docx file.
For example:
find English language word in German language docx file.
Googles kostenlose Online- Übersetzungsdienstsofort ihre Übersetzung von Text und Web-Seiten.
above is a German language text, here Google is english its should higlight Google.
Please suggest on this.

How can I output .doc files with bolded and colored text

I need to output text to a .doc file. I am currently just outputting to a file like usual and using a .doc at the end of the file name
File.open('output_file.doc', 'a+') {|x| x.write(str)}
The issue is I want to make some of the text red and bold. How can this be achieved? I am using ruby, but I can easily switch to jruby thanks to the amazingness that is rvm, so if there are java libraries for this, that'd be great as well.
The short answer: use .rtf and then convert to .doc using word or open office. The following .rtf file (writes "normal text red text more normal text." and colors and bolds the red text):
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;\red255\green0\blue0;}
\margl1440\margr1440\vieww13280\viewh10420\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\f0\fs24 \cf0 normal text
\b \cf2 red text
\b0 \cf0 more normal text.}
The long answer:
Strings are just plain ascii text, so there is no command that can make them bold. This is a property of all files in general, not just how Ruby works with files.
What text-editors do is use key strings within the file as commands to render the text in a certain way. For example, double asterisk surrounds bold text in the Stack Overflow editor. The file format of a file determines these rules.
.rtf is a basic file format that has the features you want and is easy to convert to .doc using msword or open office. THe advantage to .rtf is that it is human readable. So you can write an rtf file with red text, rename it .txt and open in a text editor and see what "decorations" the red font added. Play around with the parameters
If you are curious, the complete .rtf specifications can be found here:
http://www.biblioscape.com/rtf15_spec.htm
What's all the garbage at the top? That is header stuff. Fortunately you don't need to add more header material to add more text.

Changing font of text error

I have a textbox control inside of a software app which has some text in it. That software is using a custom font which doesn't exist anywhere else and is just specific to this program. I don't have it's source or access to it's creators. Now I want to copy that text inside of a notepad or MS word but when I do the text is no more readable unless I change the font of word processor to the font that the software is using (the font that text is written with). So I want the text to be readable anywhere and not to depend on a specific font. So is it possible?
I'm a c# programmer. Here is an example of unreadable text:
ý¶† ±øõœ ­ý¶† –ý¾‡¨ ÿ†°†¬ ­ñð‡ì úÞ±¶ Ä쇤 ½±”
à¥ì ±øõœ þ·ñœ­Œ Ý稆­Œ ô±º±” (.ì)
[þü‡íý‘†õø]
ý¶†
[þ¶­ñùì ïõéÎ]
±øõœ ­ý¶† ‡º±”
[þíýº]
ý¶†
[úð‡ýì‡Î —‡¤çȾ†] ÿ¬.¹†.ë† °­©ì ÿû¬‡ì ²† þÎõð.ÿ¬.¹†.ë†"
The interesting thing is that it's showing up like this in almost all the fonts except the one that text is originally written with. By the way the text is in Arabic and all of fonts that I tested the text with are supporting Arabic chars.
Now if I type some text that consist of English and Arabic in that font then change the font of notepad to some other font it's looks OK and works normal! So the problem only appears when the text is pasted into the word processor.
EDIT: I think I found the problem! The custom font is a raster font (bitmap font) which has a .fon extension and in the following thread someone wanted to convert the bitmap font to ttf since he was having a problem in printing the documents. I want to copy and paste, so maybe I have to convert the font ?
The discussion:
how to convert a bitmap font .fon into a truetype font ttf
Any kind of help is really appreciated.
thank you.
any kind of help is really appreciated.
If I had seen this question on superuser.com my answer would have been:
You can change the font of text from font A to Arial.
For example in Microsoft Word
Open the Replace dialog box (Edit >> Replace or Ctrl + H)
Make sure no text is specified in the Find what or Replace with boxes
Click in the Find what box, then click Format (If you don’t see the Format button, click More to expand the search options)
Select Font from the pop up list
In the Find Font dialog box, select the text formatting options you would like to replace
Click OK
Click in the Replace with box
Click Format
Select Font from the pop up list
In the Replace Font dialog box, select the new text formatting options you would like to apply
Click OK
Click Replace all
Click OK
Click Close
(from http://wordprocessing.about.com/cs/quicktips/qt/fontreplace.htm)
As an aside: If the document uses styles, it is actually much easier to change the font. For this reason I try to always use styles and never directly apply fonts to text.
If you are not referring to Word documents, please amend your question to say exactly what software was used to create the text - or exactly what file-format the text is stored in.
Since you asked on stackoverflow.com I slowly deduced you may be writing a program in some unspecified programming language. I suggest you edit your question and specify what programming language you are using and give some example code to illustrate the problem.
For example, in Java you might do something like
JLabel label = new JLabel("hello world");
label.setFont(new Font("Arial", Font.PLAIN, 12));
It sounds very much as though the author of the original program has invented their own character encoding and provided a font to go with it. Maybe the development tools were restricted to ANSI text and the developers came up with this extreme solution.
Test out the hypothesis by writing some English text in the custom
font and see if Arabic
characters appear.
If this is so then you will have to work out what the encoding is and translate the strings character by character.

Resources