You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constants that are not user-facing (like environment variable names, command names) should be placed in `internal/localizer/constants.go` and do not need localization.
173
+
174
+
### Generating Localization Files
175
+
176
+
After adding new localizable strings, you **must** regenerate the translation catalog files before committing. The build scripts handle this automatically.
177
+
178
+
#### On Windows
179
+
180
+
```cmd
181
+
build\build.cmd
182
+
```
183
+
184
+
This script:
185
+
- Installs `gotext` if not already installed
186
+
- Runs `go generate` which executes the gotext command defined in `internal/translations/translations.go`
187
+
- Generates/updates the translation catalog in `internal/translations/catalog.go`
188
+
- Reports any conflicting localizable strings that need to be fixed
189
+
190
+
#### On Linux/macOS
191
+
192
+
Run the following commands manually:
193
+
194
+
```bash
195
+
# Install gotext if not already installed
196
+
go install golang.org/x/text/cmd/gotext@latest
197
+
198
+
# Generate translation files
199
+
go generate ./...
200
+
```
201
+
202
+
### Important Notes
203
+
204
+
- Always run the build script after adding new user-facing strings
205
+
- Check the build output for "conflicting localizable strings" warnings and resolve them
206
+
- The `SQLCMD_LANG` environment variable controls the runtime language (e.g., `de-de`, `fr-fr`)
207
+
- Test your changes with different language settings to ensure proper localization
208
+
158
209
## Azure Authentication
159
210
160
211
- Azure AD authentication is supported via the `azidentity` package
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,24 @@ sqlcmd
112
112
113
113
If no current context exists, `sqlcmd` (with no connection parameters) reverts to the original ODBC `sqlcmd` behavior of creating an interactive session to the default local instance on port 1433 using trusted authentication, otherwise it will create an interactive session to the current context.
114
114
115
+
### Piping input to sqlcmd
116
+
117
+
You can pipe SQL commands directly to `sqlcmd` from the command line. This is useful for scripting and automation:
Note: When piping input, `GO` batch terminators are optional—`sqlcmd` will automatically execute the batch when the input ends. However, you can still include `GO` statements if you want to execute multiple batches.
132
+
115
133
## Sqlcmd
116
134
117
135
The `sqlcmd` project aims to be a complete port of the original ODBC sqlcmd to the `Go` language, utilizing the [go-mssqldb][] driver. For full documentation of the tool and installation instructions, see [go-sqlcmd-utility][].
0 commit comments