views:

37

answers:

2

We frequently integrate with services developed and maintained in other countries like Spain, Chile, India etc. I see consitently that the services/API calls from Spain and Chile are in Spanish. But we want our code to be English and Javadoc to be both in English and Spanish. I am seeking the best way to achieve this.

Is there a common accepted standard for this kind of scenario?

Below is the example of second last name that is specific to Spain. getLastName() is clear enough for English speaking people but this API is also exposed to Spanish speaking people and hence I added a Javadoc as you see below.

     /**
     * Segundo Apellido
     */
    String getSecondLastName();
A: 

One possible discussed in this stacloverflow question. May help.

Gopi
+1  A: 

There is no convention per se, but what you need to do is possible using a doclet like this:

http://sourceforge.jp/projects/sfnet_l10ndoclet/

Sun used to provide the source for its internal localization doclets on demand, but I wouldn't bet the house on it:

http://java.sun.com/j2se/javadoc/faq/index.html#localizationdocletsh

Personally, I recommend to document in a single language whenever possible, and write extensive explanatory notes for non-native speakers as necessary. Invest in the foreign-language skills of your developers if you feel it is necessary -- it will pay off sooner or later.

codehead