[JDBC] Chage driver locale.
[JDBC] Chage driver locale.
От:
Jean Dannemann <jean.carone@gmail.com>
Дата:
Hi.
I just realized that the PostgreSQL JDBC JAR contains a package called org.postgresql.translation with the messages translations for many countries.
How do I change the JDBC driver's locale? I would like to have portuguese messages (pt_BR).
I've tried with "-Duser.language=xx -Duser.region=YY" on catalina.bat but it did not worked.
PS: I have postgresql-42.1.4.jar in the lib directory of my Tomcat server and my application obtains the database connection via JNDI.
I've tried with "-Duser.language=xx -Duser.region=YY" on catalina.bat but it did not worked.
PS: I have postgresql-42.1.4.jar in the lib directory of my Tomcat server and my application obtains the database connection via JNDI.
Thanks in advance.
Re: [JDBC] Chage driver locale.
От:
Dave Cramer <pg@fastcrypt.com>
Дата:
My understanding is that this is set by the locale of the JVM ? But candidly I have no direct experience with this.
On 8 August 2017 at 04:24, Jean Dannemann <jean.carone@gmail.com> wrote:
Hi.
I just realized that the PostgreSQL JDBC JAR contains a package called org.postgresql.translation with the messages translations for many countries. How do I change the JDBC driver's locale? I would like to have portuguese messages (pt_BR).
I've tried with "-Duser.language=xx -Duser.region=YY" on catalina.bat but it did not worked.
PS: I have postgresql-42.1.4.jar in the lib directory of my Tomcat server and my application obtains the database connection via JNDI.Thanks in advance.
Re: Chage driver locale.
От:
Dave Cramer <pg@fastcrypt.com>
Дата:
My understanding is that this is set by the locale of the JVM ? But candidly I have no direct experience with this.
On 8 August 2017 at 04:24, Jean Dannemann <jean.carone@gmail.com> wrote:
Hi.
I just realized that the PostgreSQL JDBC JAR contains a package called org.postgresql.translation with the messages translations for many countries. How do I change the JDBC driver's locale? I would like to have portuguese messages (pt_BR).
I've tried with "-Duser.language=xx -Duser.region=YY" on catalina.bat but it did not worked.
PS: I have postgresql-42.1.4.jar in the lib directory of my Tomcat server and my application obtains the database connection via JNDI.Thanks in advance.
Re: [JDBC] Chage driver locale.
От:
Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Дата:
Jean>I've tried with "-Duser.language=xx -Duser.region=YY" on catalina.bat but it did not worked.
Please try -Duser.language=pt -Duser.region=BR
It does result into message like
rg.postgresql.util.PSQLException: ResultSet não está posicionado corretamente, talvez você precise chamar next.
at org.postgresql.jdbc.PgResultSet.checkResultSet(PgResultSet.java:2789)
Note: there are non-translated to pt_BR messages, so you will still see English variations.
PS. Feel free to file PRs to improve the translation: https://github.com/pgjdbc/pgjdbc/tree/master/pgjdbc/src/main/java/org/postgresql/translation
Vladimir
Re: Chage driver locale.
От:
Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Дата:
Jean>I've tried with "-Duser.language=xx -Duser.region=YY" on catalina.bat but it did not worked.
Please try -Duser.language=pt -Duser.region=BR
It does result into message like
rg.postgresql.util.PSQLException: ResultSet não está posicionado corretamente, talvez você precise chamar next.
at org.postgresql.jdbc.PgResultSet.checkResultSet(PgResultSet.java:2789)
Note: there are non-translated to pt_BR messages, so you will still see English variations.
PS. Feel free to file PRs to improve the translation: https://github.com/pgjdbc/pgjdbc/tree/master/pgjdbc/src/main/java/org/postgresql/translation
Vladimir