SQLcl is a Java application. The Oracle Java Virtual Machine (JVM) and JDBC driver looks at your Operating System to determine things like what language should be used for your user interface and your NLS_LANG setting for your Oracle session.
Many of you like to keep your OS in your native language, but reserve your development tools to English.
So, without forcing your email, browser ,and everything else on your machine to a different language, how do I tell SQLcl to use the language I want?
In Oracle SQL Developer, you’d add this line to your sqldeveloper.conf or product.conf file:
Then, even if your OS was setup for Simplified Chinese or Portuguese, your SQL Developer user interface would be in English.
However, there is no sqlcl.conf – we have a compiled binary you can run.
So, if you want to set any JVM flag for your instance of SQLcl, you can set this Environment Variable.
SQLcl in Spanish
There are hundreds of languages supported in general, but for our database tools, we support 9.
English, Portuguese, Italian, Spanish, French, Simplified Chinese, Japanese, and Korean. You can find the codes for these here.
I can tell you that the language code for Spanish is ‘es’
To send that to SQLcl, we’re going to use a session environment variable.
So in Windows –
c:\SQLDev\sqlcl\20.2\sqlcl\bin>SET JAVA_TOOL_OPTIONS=-Duser.language=es c:\SQLDev\sqlcl\20.2\sqlcl\bin>sql hr/oracle Picked up JAVA_TOOL_OPTIONS: -Duser.language=es SQLcl: Versi≤n 20.2 Production en mar. ago. 25 15:37:58 2020 Copyright (c) 1982, 2020, Oracle. Todos los derechos reservados. Last Successful login time: Mar Ago 25 2020 15:38:01 -04:00 Conectado a: Oracle Database 12c Enterprise Edition Release 126.96.36.199.0 - 64bit Production Se ha encontrado login.sql en el CWD. El acceso a la DB estß restringido para login.sql. Ajuste SQLPATH para incluir la ruta y activar la funcionalidad completa. SQL>
Error messages will come back in Spanish as well.
Setting other JVM flags
Let’s say for…REASONS…you need to increase the amount of memory avilable to SQLcl versus what you get by default.
JVisualVM shows me what’s going on for any Java program running on my machine. I can also use it to see any JVM arguments that have been set.
Ok, now let’s startup SQLcl again, but this time with
c:\SQLDev\sqlcl\20.2\sqlcl\bin>SET JAVA_TOOL_OPTIONS=-Duser.language=fr -Xmx800m c:\SQLDev\sqlcl\20.2\sqlcl\bin>sql hr/oracle Picked up JAVA_TOOL_OPTIONS: -Duser.language=fr -Xmx800m SQLcl : version 20.2 Production sur mar. ao√t 25 15:57:21 2020 Copyright (c) 1982, 2020, Oracle. Tous droits rΘservΘs....
We can see both -Duser.language and the -Xmx flags have been recognized.
Yes, this should be documented.
We have an awesome documentation team. They’ll be adding this content ASAP in the SQLcl Quick Reference Guide.