Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My country uses this numbering system so 100000 is One Lakh and not One Hundered Thousand.

Now I'm trying to convert a numeric value to words. Pretty simple using this technique. The issue is, it uses a normal western style system and I want the result in the south asian system.

Is there a way to do this?

share|improve this question
    
you might take a look here: office.microsoft.com/en-us/word-help/… –  kmote Jul 11 '13 at 21:33
    
I'm reaching here, because I really doubt this feature is available for foreign languages, but if it is, I would assume it would require a foreign version of Word. You might check out these Office Language Packs: office.microsoft.com/en-us/downloads/… –  kmote Jul 11 '13 at 21:37
    
this one is even a longer stretch, but you might look into the Translation functionality: library.vicu.utoronto.ca/library_services/technology/… –  kmote Jul 11 '13 at 21:38
add comment

1 Answer

You can extend the CardText switch using a variety of fields so that it follows the numbering system you want. The following field code will handle numbers up to 99 lakh correctly, if you want to go higher such as to crore you just need to add an extra level of IF fields. Note that the CardText switch by itself can only handle numbers up to a million anyway.

Input field code

{ QUOTE { SET n 1099999 } { IF n < 100000 “{ = n \*cardtext }” “{ = int(n/100000) \* cardtext } lakh { SET r { = MOD(n, 100000) } *}*{ IF r = 0 “” “{ = r \* cardtext }}} \* caps \* CharFormat }

Output

Ten Lakh Ninety-Nine Thousand Nine Hundred Ninety-Nine

I have uploaded a demo document which includes the above field (click the link and then choose File -> Download). You may wish to add this as an autotext entry to make it easier to insert.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.