I have RTF Template and I need to show words of total amount in Arabic
for example :
Total Amount : 136,369.58
English Format : ONE HUNDRED THIRTY-SIX THOUSAND THREE HUNDRED SIXTY-NINE AND FIFTY-EIGHT
Arabic Format : مائة وستة وثلاثون ألفًا وثلاثمائة وتسعة وستون ريال وثمانية وخمسون هلله
I used xdoxslt:toCheckNumber($_XDOLOCALE, sum(COLUMN_NAME), ‘EUR’, ‘CASE_UPPER’, ‘DECIMAL_STYLE_WORDS’) to get English Format and it worked fine for English but does not work for Arabic.
I tried many google links to get Arabic Format but I got nothing.
This working fine , I guess. Good Luck
Remove the space between the first < and ?
< ?xdoxslt:toCheckNumber('AR-SAR', FINAL_AMOUNT, 2)?>
Related
I am trying to create a PDF File to export using jsPDF library. In one of the lines I am trying to write a word that contains this 'ū' letter,
doc.text('Hūla', 20, 30);
However, when doing so the exported file doesn't contain this letter but instead it becomes
'H k l a' with spaces in between and a k instead of the ū.
What can I do in order to have this printed properly?
The solution was to use a font that supports this. I had to try multiple ones in order to get it working with this letter ū (it is not a specific language)
The font was Amiri. It also supported the Arabic font.
I'm working on an app that shows currencies with large numbers.
To make it more user friendly it would be nice to show the numbers with letters, e.g:
$24,514,983,671 -> $24.5B // English
3,306,777.10 € -> 3,31 Mio. € // German
kr 23 000 000 -> kr 23 mill. // Norwegian
The numbers should have minimumSignificantDigits = 1 and maximumSignificantDigits = 3.
How should this be solved in Swift? Is there any library available?
Android has this solution
It seems to be based on swift-corelibs-foundation: Github, but I can't see how to use it in my app.
Will I have to make the logic myself with localized translations?
I have found an answer for using general abbreviations K/M/B for large numbers here: iOS convert large numbers to smaller format, but it does not solve the whole problem.
You will have to implement your own solution, but it is not hard. One way to go would be to create two dictionaries where the key will be the Locale identifier and the value the translation:
let millionTrans = [ "en_US" : "million", ...]
let billionTrans = [ "en_US': "billion", ...]
then get the Locale.current, find out if the amount is in the millions or billions and query the appropriate dictionary to get its value.
I have to convert an .xlsx file to text such that it looks like the following:
0001 2-5-9
00002 2-6-9
003 2-7-9
But when I convert it to a .txt file I end up with the following:
0001 2-5-9
00002 2-6-9
0003 2-7-9
Any help would be greatly appreciated! I've tried Notepad++ already, but I can't figure out how to fix it using that. I've tried code alignment but there's no consistent reference point in the data set such as = or , to align by.
You can use Excel for this too. Try Save As and search for e.g. Formatted Text (Space delimited) (*.prn). I don't know exactly because I have a German GUI. Save this file and open with Notepad++ for your needs.
I've hit a problem during parsing of a CSV file where I get the following error:
CSV::MalformedCSVError: Illegal quoting on line 3.
RAILS code in question:
csv = CSV.read(args.local_file_path, col_sep: "\t", headers: true)
Line 3 in the CSV file is:
A-067067 VO VIA CE 0 8 8 SWCH Ter 4, Loc Is Here, Mne, Per Fl Auia/Sey IMAC NEK_HW 2011-03-09 09:47:44 2011-03-09 11:50:26 2011-01-13 10:49:17 2011-02-14 14:02:43 2011-02-14 14:02:44 0 0 771 771 46273 "[O/H 15/02] B270 W31 ""TEXT TEXT 2 X TEXT SWITC" SOME_TEXT SOME_TEXT N/A Name Here RESOLVED_CLOSED RESOLVED_CLOSED
UPDATE: Tabs don't appear to have come across above. See pastebin RAW TEXT: http://pastebin.com/4gj7iUpP
I've read numerous threads all over StackOverflow and Google about why this is and I understand that. But the CSV row above has perfectly legal quoting does it not?
The CSV is tab delimited and there is only a tab followed by the quote on either side of the column in question. There is 1 quote in that field and it is double quoted to escape it. So what gives? I can't work it out. :(
Assuming I've got something wrong here, I'd like the solution to include a way to work around the issue as I don't have control over how the CSV is constructed.
This part of your CSV is at fault:
46273 "[O/H 15/02] B270 W31 ""TEXT TEXT 2 X TEXT SWITC" SOME_TEXT
At least one of these parts has a stray space:
46273 "
" SOME_TEXT
I'd guess that the "3" and the double are supposed to be separated by one or more tabs but there is a space before the quote. Or, there is a space after the quote on the other end when there are only supposed to be tabs between the closing quote and the "S".
CSV escapes double quotes by double them so this:
"[O/H 15/02] B270 W31 ""TEXT TEXT 2 X TEXT SWITC"
is supposed to be a single filed that contains an embedded quote:
[O/H 15/02] B270 W31 "TEXT TEXT 2 X TEXT SWITC
If you have a space before the first quote or after the last quote then, since your fields are tab delimited, you have an unescaped double quote inside a field and that's where your "illegal quoting" error comes from.
Try sending your CSV file through cat -t (which should represent tabs as ^I) to find where the stray space is.
I am trying to use Zebra Printer for printing in French.
The problem which I face is as below.
I want to print in French using Zebra MZ220.
The characters will be dynamic
Zebra's programming manual mentions below
COUNTRY USA
TEXT 4 0 0 8 COUNTRY IS USA
TEXT 4 0 0 15 #$#[]^‘{|}~
will print
COUNTRY IS USA
#$#[]^‘{|}~
When I have to print in French, I have to use the command as below.
COUNTRY FRANCE
TEXT 4 0 0 28 COUNTRY IS FRANCE
TEXT 4 0 0 35 #$#[]^‘{|}~
which will print as
COUNTRY IS FRANCE
//corresponding french characters//
Now, how can I directly send the French characters instead of sending replacement characters?
I have banged my head all around to get an answer with no luck.
Please help.
I'd use some sort of mapping function to perform the translation. You'd call it with what you want to print and it would return what you need to send to get that output, or tell you if that's not possible.
The details depend on the programming language.