@open-file-viewer/core 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -249,6 +249,23 @@ createViewer({
249
249
 
250
250
  Use `toolbar.render(ctx)` when you need to replace the toolbar completely. The context exposes file metadata, queue navigation, preview commands, download, fullscreen, print and search helpers.
251
251
 
252
+ ## Locale and Fallback Text
253
+
254
+ Fallback text defaults to Simplified Chinese for compatibility. Set `locale: "en-US"` for English built-in loading and unsupported-file messages, or override individual strings with `messages`:
255
+
256
+ ```ts
257
+ createViewer({
258
+ container: "#viewer",
259
+ file,
260
+ locale: "en-US",
261
+ messages: {
262
+ unsupportedTitle: "No inline preview available",
263
+ downloadFile: "Download original file"
264
+ },
265
+ plugins
266
+ });
267
+ ```
268
+
252
269
  ## License
253
270
 
254
271
  MIT