How Offline Mode Works

Explanation8 min read

Lectio's offline mode is designed for translators working in regions with unreliable internet — rural areas, traveling between sites, or locations where connectivity drops without warning. This article explains how the system stores your work, syncs it back, and handles the edge cases that come with offline translation.

Why Offline Mode Exists#

Many translation teams work in places where stable internet is not guaranteed. A translator working on a discipleship curriculum in rural Southeast Asia, a team localizing training materials in sub-Saharan Africa, or someone translating on a long-haul flight — all need the confidence that their work will not be lost if the connection drops.

Lectio's offline mode ensures that translation work continues uninterrupted regardless of connectivity. When you are online, everything works normally. When you go offline, your work is saved locally and synced back automatically when the connection returns.

The Two Layers: PWA and Local Storage#

Offline mode operates on two layers:

Layer 1: The Installed App (PWA)

When you install Lectio from your browser to your home screen, it runs as a Progressive Web App. This means the application code itself — the interface, the translation workspace, all the components — is cached by a service worker on your device. Even without internet, the app opens and functions.

This is the foundation. Without the PWA installation, the browser would show a "no connection" error when you try to open Lectio offline.

Layer 2: Project Data (IndexedDB)

The app code alone is not enough — you also need the translation data: segments, source text, glossary matches, translation memory hits, formatting. This data is stored in your browser's IndexedDB, a local database built into every modern browser.

When you cache a project (or Lectio auto-caches it for you), all of that project's data is written to IndexedDB. When you translate offline, your changes are also written there. This is why the cache button matters — it downloads the project data that makes offline work possible.

How Saves Work#

When Online

When you are connected to the internet, saving works as you would expect. You type a translation, move to the next segment, and your work is sent to the Lectio server. The save indicator shows "Autosaved" when the server confirms receipt.

If a save fails due to a momentary network hiccup, Lectio retries automatically with increasing delays (1 second, then 2, then 4, up to 60 seconds). During retries, the indicator shows "Retrying..." in amber.

When Offline

When the connection drops, Lectio detects the change within seconds. Saves are redirected to a local queue called the outbox — a list of pending changes stored in IndexedDB on your device.

Each entry in the outbox records:

  • Which segment was changed
  • The translation text you typed
  • Whether you confirmed the segment
  • When the change was made

The save indicator shows "Saved locally" with a database icon. Your work is safe on your device.

The Sync Engine#

When connectivity returns, Lectio runs a 5-phase sync process to reconcile your offline work with the server.

Phase 1: Pre-flight Checks

Before sending any data, the sync engine verifies three things:

  • Are you still logged in? Sessions expire after a period of inactivity. If yours has expired, the sync pauses and asks you to log in again.
  • Do you still have access? If a team admin changed your permissions while you were offline, the sync detects this.
  • Does the project still exist? If the project was deleted, the sync lets you export your work instead.

Phase 2: Check for Server Changes

The sync engine asks the server: "What changed since I last synced?" This retrieves any segments that teammates edited while you were offline.

Phase 3: Conflict Detection

The engine compares your offline changes against the server changes. A conflict occurs when both you and a teammate edited the same segment's translation text.

If only metadata changed on the server (for example, a glossary was updated or a TM match was added), that is not a conflict — those changes merge cleanly.

Phase 4: Send Your Changes

Each pending change is sent to the server one at a time, with a brief pause between requests to avoid overwhelming the connection. The sync report tracks which changes succeeded and which did not.

Phase 5: Reconcile

After your changes are sent, the sync engine refreshes the full project from the server to ensure your local data matches the current state. This picks up any changes from teammates, updated glossary hits, and other metadata.

How Conflicts Are Resolved#

When a conflict is detected — you and a teammate both edited the same segment — Lectio applies a simple rule: your offline version wins.

This is called "last-write-wins" and it is the safest default for offline translation. Your most recent work is preserved. The sync report flags every conflict so you can review them and compare with the server version if needed.

In practice, conflicts are uncommon. They typically occur when:

  • Two translators are assigned the same document (a workflow misconfiguration)
  • An editor makes corrections to a segment you were also editing offline
  • A teammate re-translates a segment you had already completed before going offline

The sync report makes conflicts visible so nothing is lost silently.

Storage and Device Considerations#

How Much Storage Do I Need?

Caching a project requires at least 50 MB of available browser storage. A typical document with a few hundred segments uses far less than that, but the minimum ensures room for the outbox, metadata, and future edits.

iOS Storage Eviction

On iPhones and iPads, the operating system can clear IndexedDB data when the device is low on storage. This is an iOS-level behavior that Lectio cannot override.

If this happens, Lectio detects the missing data and shows a "Cache expired" indicator. You will need to re-cache the project when you have a connection. Any changes that were in the outbox at the time of eviction are lost — this is why syncing regularly during brief windows of connectivity is important.

Lectio requests "persistent storage" from the browser to reduce the likelihood of eviction, but iOS does not guarantee it.

Android and Desktop

On Android and desktop browsers, storage eviction is much less aggressive. Cached data typically persists until you explicitly clear your browser data or uninstall the app.

Network Detection#

Lectio uses two methods to detect your connectivity status:

  1. Browser signal — The browser reports whether the device has a network connection. This catches obvious cases like airplane mode or disconnected Wi-Fi.
  2. Server health check — Every 60 seconds (or 10 seconds when offline), Lectio sends a small request to the server to verify the connection actually works. This catches cases where the device reports "connected" but the connection is too slow or broken to function.

Both must pass for Lectio to consider you online. This conservative approach prevents the app from trying to sync over a non-functional connection.

The Emergency Export#

If syncing fails entirely — your session expired and you cannot log in, the project was deleted, or your access was revoked — Lectio offers an emergency export.

The export produces a TSV file (tab-separated values) containing every segment with a translation, along with the source text, segment type, and confirmation status. You can open this file in any spreadsheet application.

This is a safety net, not a regular workflow. In normal use, the sync engine handles everything. But for translators working in challenging connectivity environments, knowing that their work can always be recovered — even in the worst case — provides essential peace of mind.

Summary#

StateWhat Happens
OnlineSaves go directly to the server. Everything works normally.
Connection dropsThe current page stays visible and a global offline status appears. Saves redirect to the local outbox where supported; online actions pause.
Working offlineTranslations saved locally. Full segment navigation and editing available.
Connection returnsA brief "Back online" status appears and the sync engine runs automatically. A report appears only if something needs attention.
Conflict detectedYour offline version wins. Sync report flags it for review.
Sync failsEmergency TSV export preserves all your work.

Need more help?

Chat with our AI assistant or create a support ticket.