Skip to content

Translations

This document outlines how administrators can manage translations for both the public-facing website (content sourced from Sanity CMS) and the internal dashboard application.

Translations for Website (via Sanity CMS)

Administrators typically do not directly manage website translations within the DistroMotion admin panel. Content for the public website, including its various language versions, is managed through Sanity CMS.

Process Overview (Simplified for Admins):

  1. Content Creation/Update in Sanity: New content or updates to existing content are made in the primary language within Sanity CMS.
  2. Translation Workflow in Sanity: Sanity CMS usually has built-in features or integrations with third-party services to manage the translation of this content into different languages.
  3. Publishing: Once translated and reviewed within Sanity, the content is published, making the different language versions available on the live website.

Admin’s Role:

  • Ensure that content editors and translators are aware of the process for managing multilingual content in Sanity CMS.
  • Coordinate with the team responsible for Sanity CMS to understand the status of translations and any issues.
  • Verify that the website correctly displays the different language versions once published from Sanity.

For detailed instructions on managing translations within Sanity CMS, please refer to the Sanity CMS documentation or contact the team responsible for its administration.


Translations for Dashboard

The Translations page within the DistroMotion staff admin panel allows administrators to manage language translations specifically for the dashboard interface. This ensures that staff members who speak different languages can use the dashboard effectively.

Internal Logic:

The dashboard uses a key-value system for translations. Each piece of text in the interface (e.g., a button label, a table header, a notification message) is associated with a unique “key.” The translation process involves providing the corresponding text (the “value”) for each key in every supported language.

When an administrator imports a translation file, the system parses this file and updates its internal translation database. When a staff member uses the dashboard, the system looks up the appropriate translated string for their selected language using these keys.

Finding Global Language Codes

For reference check at the bottom of the page.

Template

The downloaded template provides a structured format for adding or updating translations. It usually includes columns like translation key, source text, and translated text for each language.

  • Download Template: This button allows users to download a template Excel file for translation purposes. The template helps in standardizing the format for importing translations.
  • Import Translations: This button opens a modal for uploading completed translation templates.

Import Translations

When you click on the Import Translations button, a modal appears where you can upload your completed translation template. The modal includes the following fields:

  1. Language Code: A text field where you need to input the language code (e.g., en for English).
  2. Language Name: A text field for specifying the language name (e.g., English).
  3. Choose File: A file upload field where you can select the completed translation template file.

Buttons:

  • Cancel: Closes the modal without making any changes.
  • Import: Confirms the import of the selected file and processes it.

Page Sections and Features

The table on the page displays the list of translations with the following columns:

  1. ID: A unique identifier for the translation.
  2. Language Code: The code representing the language (e.g., en for English, hi_IN for Hindi, GJ_EN for Gujarati).
  3. Description: A brief description of the language or translation context.
  4. Status: Indicates if the translation is active or inactive.
  5. Details: A link to view further details about the specific translation.
  6. Completed Keys: The number of completed translation keys out of the total available.
  7. Completion %: The percentage of completed translation work.
  8. Created: The date when the translation was created.
  9. Updated: The most recent date when the translation was updated.
  10. Actions: Actions that can be performed on the translation (e.g., Deactivate).

Here’s dynamic and common documentation for the detailed translation view page:


Translation Details Page

The Translation Details page allows users to view and edit specific translation fields for a selected locale. This page is accessible by clicking the View link for a language on the main Translations page. It includes a set of fields where users can modify, copy, or reset default values for translation purposes.

  • The page includes tabs representing various sections or categories of the application (e.g., Root 100, Homepage 86, Youtube Mcn 100, Rights Admin 5, etc.).
  • Each tab displays the number of completed keys related to that section.
  • Clicking on a tab shows the translation details specific to that category.

How to Use

  1. Navigate to the specific section by clicking the corresponding tab.
  2. Review each field and its default value.
  3. Edit the translation as needed by typing into the input box.
  4. Use the Copy button for quick entry of the default value, if necessary.
  5. Click Save Draft to keep changes without publishing or exporting them.

Field Structure

Each section contains translation fields with the following elements:

  1. Field Name: A label identifying the translation key (e.g., Warning Alert Dialog Title).
  2. Input Box: A text field where users can enter or edit the translation text.
  3. Default Value: The original or fallback translation text provided for context (e.g., Default Value - Warning from Distromotion).
  4. Copy Button: A button allowing users to copy the default value into the input field.
  5. Status Icons: Indicators (such as icons or characters) that represent the state of the input (e.g., translated, untranslated, etc.).
  • Copy Default Values to All Fields: This button populates all input fields with their respective default values for ease of use.
  • Save Draft: Saves the current state of the translations without publishing them.

Language Codes

CodeLanguage
afAfrikaans
sqAlbanian
anAragonese
arArabic (Standard)
ar-dzArabic (Algeria)
ar-bhArabic (Bahrain)
ar-egArabic (Egypt)
ar-iqArabic (Iraq)
ar-joArabic (Jordan)
ar-kwArabic (Kuwait)
ar-lbArabic (Lebanon)
ar-lyArabic (Libya)
ar-maArabic (Morocco)
ar-omArabic (Oman)
ar-qaArabic (Qatar)
ar-saArabic (Saudi Arabia)
ar-syArabic (Syria)
ar-tnArabic (Tunisia)
ar-aeArabic (U.A.E.)
ar-yeArabic (Yemen)
hyArmenian
asAssamese
astAsturian
azAzerbaijani
euBasque
bgBulgarian
beBelarusian
bnBengali
bsBosnian
brBreton
myBurmese
caCatalan
chChamorro
ceChechen
zhChinese
zh-hkChinese (Hong Kong)
zh-cnChinese (PRC)
zh-sgChinese (Singapore)
zh-twChinese (Taiwan)
cvChuvash
coCorsican
crCree
hrCroatian
csCzech
daDanish
nlDutch (Standard)
nl-beDutch (Belgian)
enEnglish
eoEsperanto
etEstonian
foFaeroese
faFarsi
fjFijian
fiFinnish
frFrench (Standard)
fr-beFrench (Belgium)
fr-caFrench (Canada)
fr-frFrench (France)
fr-luFrench (Luxembourg)
fr-mcFrench (Monaco)
fr-chFrench (Switzerland)
fyFrisian
furFriulian
gdGaelic (Scots)
gd-ieGaelic (Irish)
glGalacian
kaGeorgian
deGerman (Standard)
de-atGerman (Austria)
de-deGerman (Germany)
de-liGerman (Liechtenstein)
de-luGerman (Luxembourg)
de-chGerman (Switzerland)
elGreek
guGujurati
htHaitian
heHebrew
hiHindi
huHungarian
isIcelandic
idIndonesian
iuInuktitut
gaIrish
itItalian (Standard)
it-chItalian (Switzerland)
jaJapanese
knKannada
ksKashmiri
kkKazakh
kmKhmer
kyKirghiz
tlhKlingon
koKorean
ko-kpKorean (North Korea)
ko-krKorean (South Korea)
laLatin
lvLatvian
ltLithuanian
lbLuxembourgish
mkFYRO Macedonian
msMalay
mlMalayalam
mtMaltese
miMaori
mrMarathi
moMoldavian
nvNavajo
ngNdonga
neNepali
noNorwegian
nbNorwegian (Bokmal)
nnNorwegian (Nynorsk)
ocOccitan
orOriya
omOromo
faPersian
fa-irPersian/Iran
plPolish
ptPortuguese
pt-brPortuguese (Brazil)
paPunjabi
pa-inPunjabi (India)
pa-pkPunjabi (Pakistan)
quQuechua
rmRhaeto-Romanic
roRomanian
ro-moRomanian (Moldavia)
ruRussian
ru-moRussian (Moldavia)
szSami (Lappish)
sgSango
saSanskrit
scSardinian
gdScots Gaelic
sdSindhi
siSinghalese
srSerbian
skSlovak
slSlovenian
soSomani
sbSorbian
esSpanish
es-arSpanish (Argentina)
es-boSpanish (Bolivia)
es-clSpanish (Chile)
es-coSpanish (Colombia)
es-crSpanish (Costa Rica)
es-doSpanish (Dominican Republic)
es-ecSpanish (Ecuador)
es-svSpanish (El Salvador)
es-gtSpanish (Guatemala)
es-hnSpanish (Honduras)
es-mxSpanish (Mexico)
es-niSpanish (Nicaragua)
es-paSpanish (Panama)
es-pySpanish (Paraguay)
es-peSpanish (Peru)
es-prSpanish (Puerto Rico)
es-esSpanish (Spain)
es-uySpanish (Uruguay)
es-veSpanish (Venezuela)
sxSutu
swSwahili
svSwedish
sv-fiSwedish (Finland)
sv-svSwedish (Sweden)
taTamil
ttTatar
teTeluga
thThai
tigTigre
tsTsonga
tnTswana
trTurkish
tkTurkmen
ukUkrainian
hsbUpper Sorbian
urUrdu
veVenda
viVietnamese
voVolapuk
waWalloon
cyWelsh
xhXhosa
jiYiddish
zuZulu