Question: I need to get elements id and class when something is dropped on it. Id works fine, but class is not passed...

HTML

```
<div id="drag" class="two">drag</div>
<div id="drop" class="one">drop</div>

```

JS

```
$(document).ready(function(){
    $("#drag").draggable();
    $("#drop").droppable({
        drop: function(){
            alert(this.class+" "+this.id)
        }
    });

```

[jsfiddle](http://jsfiddle.net/skunksts/U5RjC/)

Answer: 
Above all the solution is working fine, Only problem is that this is **not working for all language** because all country is not having the same set of rules to convert a number into word so we need to write a separate algorithm for each country,

**Solution**

[ICU4J](http://site.icu-project.org/home/why-use-icu4j) is an international Unicode component library that is allowed so many utilities regarding language translation follow below steps.

* **Step 1** Add ICU4J in your app level gradle like below

dependencies {

implementation group: 'com.ibm.icu', name: 'icu4j', version: '51.1'

}

* **Step 2** Define this method

`private String convertIntoWords(Double str,String language,String Country) {
 Locale local = new Locale(language, Country);
 RuleBasedNumberFormat ruleBasedNumberFormat = new RuleBasedNumberFormat(local, RuleBasedNumberFormat.SPELLOUT);
 return ruleBasedNumberFormat.format(str);
}`
* **Step 3**
Now you can call this method like below

```
double value=165;
String english=convertIntoWords(value,"en","US"); //one hundred and sixty-five
/*Peruvion*/
String Spanish=convertIntoWords(value,"es","PE"); //ciento sesenta y cinco

```

You can change language and country based on your requirements.

Enjoy
You have done all the work just display String returnz in a text field like this

```
 results.setText(returnz);

```