Languages
ShopClass is multilingual throughout: categories, static pages, custom fields and e-mail templates all carry a value per active language.
Settings → Languages.
Adding a language
Section titled “Adding a language”Add language installs from the official translations. What is available comes from mindstellar/shopclass-i18n, which is where translations are maintained and where you contribute a fix.
If the language you want is not offered (the screen says no official languages available when it cannot reach the list), you can upload a translation file directly.
Each language has two separate switches:
- Enabled (website): visitors can see the site in this language.
- Enabled (oc-admin): admins can use the admin panel in this language.
Turn one on without the other to prepare a language before showing it to visitors, or to give your team an admin language your visitors don’t have.
Setting the default
Section titled “Setting the default”The site default language is set in Settings → General. It is what visitors see before they choose, and what content falls back to.
Settings › Languages marks the Site default and the Admin default. Use Make site default or Make admin default on a language’s row to change them. The admin default is the language the admin login offers first.
Content language tabs list the site default first and open on it. Pages, e-mail templates and custom fields get a tab for each language that is on for the website.
If the default is empty or its language folder is missing, Shopclass uses en_US, else the first language that is on.
What you have to translate yourself
Section titled “What you have to translate yourself”Installing a language translates the interface. Your own content is not translated by anyone but you:
| Content | Where |
|---|---|
| Category names | Listings → Categories: one name per active language |
| Static pages | Pages: title and body per language |
| Field and form labels | Forms: the admin requires a name for the site default language |
| E-mail templates | Settings → Email templates: per language |
Changing or translating a text
Section titled “Changing or translating a text”The Translator plugin changes any text of the interface, your theme or a plugin, one language at a time. Install it from Plugins → Browse or upload the zip (see plugins). It needs Shopclass 7.0.6 or later. The screen is Tools → Translator.
Your changes are saved in oc-content/plugin-data/translator/. They survive
core, theme and plugin updates. Keep that folder in your backups (see
backups and maintenance).
Import and export on that screen uploads a .po file: Add merges it
into your changes, Replace keeps only the texts in the file. Undo last
upload puts your texts back once, also after Remove all my changes.
Export full downloads the whole translation as .po; Export all
gives every source as one .zip.
Category names, pages, form labels and e-mail templates are content. They keep their own screens, as in the table above.
Deciding how many to run
Section titled “Deciding how many to run”Each active language multiplies the content you maintain: every new category and every new page needs another translation, forever.
Two languages done properly beat five done half-way. On a local marketplace, one language done well usually beats both.
Searching places by name
Section titled “Searching places by name”A search can match a place by its name in any language. Only the first 10 typed names per level (country, region, city) are matched this way; any more match the stored name only.
Contributing a translation
Section titled “Contributing a translation”Translations live in shopclass-i18n. Fixing an awkward string in a language you speak takes minutes, and is one of the most useful contributions to the project: see contributing.