Re: [protobuf] Question about internationalization and localization

142 views
Skip to first unread message

Feng Xiao

unread,
Mar 15, 2013, 7:59:00 PM3/15/13
to Joann Kent, Protocol Buffers
On Fri, Mar 15, 2013 at 8:23 AM, Joann Kent <joj...@gmail.com> wrote:
Hi all,

Within the code generated by GPB (I'm using Java btw) there are exceptions thrown and the messages are hard-coded and in English.  Are there any plans to allow for internationalization/localization of these error messages?
Not that I have heard of. I'm curious, do you know any project where exception messages are internationalized?
 

Thank you,

Joann

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Oliver Jowett

unread,
Mar 16, 2013, 5:24:56 AM3/16/13
to Feng Xiao, Joann Kent, Protocol Buffers
On Fri, Mar 15, 2013 at 11:59 PM, Feng Xiao <xiao...@google.com> wrote:
On Fri, Mar 15, 2013 at 8:23 AM, Joann Kent <joj...@gmail.com> wrote:
Hi all,

Within the code generated by GPB (I'm using Java btw) there are exceptions thrown and the messages are hard-coded and in English.  Are there any plans to allow for internationalization/localization of these error messages?
Not that I have heard of. I'm curious, do you know any project where exception messages are internationalized?

The Postgresql JDBC driver does this.

Typical code looks like this:

            throw new PSQLException(GT.tr("Returning autogenerated keys is only supported for 8.2 and later servers."), PSQLState.NOT_IMPLEMENTED);

where GT.tr() is a static method that does java.util.ResourceBundle lookup at runtime, and acts as a gettext marker at build time.

Oliver

Reply all
Reply to author
Forward
0 new messages