GithubHelp home page GithubHelp logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
These are already provided by com.google.api.translate.Language, unless I'm 
missing
something (quite possible!)

eg. Language.ENGLISH is the String "en", Language.GERMAN is the String "de".

Original comment by [email protected] on 15 Dec 2008 at 8:57

  • Changed state: Invalid

from google-api-translate-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
The mapping I want is from the abbreviations to strings for the full name of 
the 
language, "English" in the case of "en" or "German" in the case of "de". So, 
right 
now Language.ENGLISH resolves to the string "en". I'd like something additional 
like 
this: 

   com.google.api.translate.Language.fullName(Language.ENGLISH) => "English"
   com.google.api.translate.Language.fullName(Language.GERMAN) => "German"

Original comment by austin.bingham on 15 Dec 2008 at 9:06

from google-api-translate-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Ah, I see. I'll have to think about how I can accomplish that neatly.

I guess where you expect "English", "German", someone else might expect 
"Anglais",
"Allemand" and the next person might even expect "English", "Deutsch". As it 
stands I
think that's roughly some 40 Strings for you to maintain or some 1600 for me? 
There
should be a neat way to do it somehow though...

Original comment by [email protected] on 15 Dec 2008 at 10:18

from google-api-translate-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Yeah, it had also occurred to me that you might want locale-specific full 
names. What 
you might be able to do is manually maintain a single set of full names in one 
language. Then, as a part of the build, generate the code for the rest of the 
translations using the translation service itself. This has the benefits of a) 
centralizing the maintenance of full names (i.e. in your library) while b) 
minimizing 
the maintenance load.

Original comment by austin.bingham on 17 Dec 2008 at 7:43

from google-api-translate-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.