Languages
English and Bengali, how translation on the way out works, switching language, the dictionary editor, word collector, export and import, and adding a language.
AIOMeeting ships in English and Bengali. Visitors pick a language from the header. The site stays one codebase: text is written in English in the code and translated on the way out.
1. How translation works
Every sentence in the pages is wrapped in the function t(). When the page is ready to be sent, the translator looks up each sentence in the dictionary of the chosen language. If it finds a match, the translated text goes out. If not, the English text goes out. Nothing is stored per language in the pages, so a missing word never breaks a page.
The meeting room gets its dictionary too. The page puts the dictionary into the room's script, so buttons and messages in the room appear in the chosen language.
Dates, numbers and prices follow the language and the visitor's currency. Names of people and meeting titles are never translated.
2. Switching language
- Visitors. Use the language picker in the header. The choice is remembered in the browser. The address
lang?set=bnsets Bengali, andlang?set=ensets English. - The default language. Set it in Settings, Languages and Translations. It applies to visitors who have not chosen one.
- Signed-in members. Their choice is kept with the session.
3. The Languages page
Open Settings, Languages and Translations.
- Languages. The list of languages and which is the default.
- Dictionary editor. Choose a language and search the phrases. Edit any translation and save. Edits are saved in the database and win over the shipped file, so an update never overwrites your wording.
- Word collector. Scans the pages and finds phrases that are not translated yet, so you can fill the gaps.
- Export and import. Download a language as JSON, edit it elsewhere, upload it again.
- New language. Add a code such as
hiorar, then fill in the dictionary. Right-to-left languages work with the theme's RTL styles.
Shipped dictionaries live in the languages/ folder, for example languages/bn.dist.json. Files ending in .dist.json are replaced by updates. Your own edits are safe because they live in the database.
4. Translating your own content
Pages, blog posts, FAQ and announcements are content, not code. Write them in each language you need:
- Write the page in English.
- Create the same page for the other language with a clear title, for example "About" and "আমাদের সম্পর্কে".
- Link the right one from the menu for that language, or use the language-aware menus.
For short text such as home page sections, add the phrases to the dictionary in the editor. They will be translated on the way out.
5. E-mails and SMS
E-mail templates are translated too. Open Settings, E-mail Templates and edit the English text and the Bengali text of each template (meeting invitation, reminder, summary, recording ready, registration received, registration approved). Each member gets mail in the language they use. See E-mail, SMS and notifications.
6. Keep translations healthy
- After an update, open the Word collector and fill the new phrases.
- Keep sentences short. Short sentences translate cleanly.
- Test the meeting room in Bengali on a phone. Long words can wrap in narrow buttons.
- Use the Bengali font that your theme loads. If letters look broken, check the font setting of the theme.
7. Adding a language by file
Copy languages/bn.dist.json to languages/xx.json, change the keys' values and add "_name": "Your language" at the top. The language then appears in the picker. Clear the cache in System and Maintenance if it does not show up.