Skip to content

Commit

Permalink
Version 1.1.0
Browse files Browse the repository at this point in the history
### Added
- Added Dutch
- Added Arabic (thanks to [Ahmad Huran](https://github.com/AhmadHuran))
- Started keeping the changelog.

### Changed
- Set language preference in cookie as well as browser storage
- Allow Internation in multi deck environments
- Auto-switch reading direction if the language has `direction: "rtl"` added
  • Loading branch information
Martinomagnifico committed Nov 13, 2022
1 parent 4446ee3 commit 2341f7f
Show file tree
Hide file tree
Showing 12 changed files with 356 additions and 156 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Changelog

## [1.1.0] - 2022-11-13
### Added
- Added Dutch
- Added Arabic (thanks to [Ahmad Huran](https://github.com/AhmadHuran))
- Started keeping the changelog.

### Changed
- Set language preference in cookie as well as browser storage
- Allow Internation in multi deck environments
- Auto-switch reading direction if the language has `direction: "rtl"` added


## [1.0.4] - 2020-07-01
### Added
- Added possibility to have translatable items outside the .slides
### Changed
- Changes of some formatting.
- Verticator now references the Reveal files by CDN.



## [1.0.3] - 2020-06-25
(Version not published on NPM)
### Added
- Added more demo pages.
### Changed
- Option to change 'langattribute'
- Option to change 'switchselector'



## [1.0.2] - 2020-06-25
### Changed
- Updated readme
- Bugfixes



## [1.0.1] - 2020-06-24
### Changed
- Updated readme
- Changed dropdown to custom



## [1.0.0] - 2020-06-24
- Initial commit
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Martijn De Jongh (Martino)
Copyright (c) 2022 Martijn De Jongh (Martino)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

[![Version](https://img.shields.io/npm/v/reveal.js-internation)](#) [![Downloads](https://img.shields.io/npm/dt/reveal.js-internation)](https://github.com/Martinomagnifico/reveal.js-internation/archive/refs/heads/master.zip)

A plugin for [Reveal.js](https://revealjs.com) 4, that can let the end user choose a language for the presentation. Creating additional languages is made easy by letting you tag elements that should be translated. Running the presentation in 'makejson'-mode will generate a full JSON file of the whole current presentation. You can then start translating this file into other languages.
A plugin for [Reveal.js](https://revealjs.com), that can let the end user choose a language for the presentation. Creating additional languages is made easy by letting you tag elements that should be translated. Running the presentation in 'makejson'-mode will generate a full JSON file of the whole current presentation. You can then start translating this file into other languages.

You should probably actually know these other languages (or someone who does) to be able to do so :-)

[![Screenshot](https://martinomagnifico.github.io/reveal.js-internation/screenshot.png)](https://martinomagnifico.github.io/reveal.js-internation/demo.html)
[<img src="https://martinomagnifico.github.io/reveal.js-internation/screenshot.png" width="800" height="450">](https://martinomagnifico.github.io/reveal.js-internation/demo.html)



## Installation
Expand All @@ -29,11 +30,10 @@ The Internation plugin folder can then be referenced from `node_modules/reveal.j

### JavaScript

The Internation plugin has been written for Reveal.js version 4. Internation also works in setups with multiple Reveal instances.

There are two JavaScript files for Internation, a regular one, `internation.js`, and a module one, `internation.esm.js`. You only need one of them:

#### Regular

If you're not using ES modules, for example, to be able to run your presentation from the filesystem, you can add it like this:

```html
Expand Down Expand Up @@ -159,7 +159,9 @@ Make a copy of your first generated JSON. Give the file a name that is obvious (

## Step 5A. Refer to your new language file(s)…

A language in Internation contains both a name and a dictionary. This example shows that a JSON file is used for the dictionary. JSON files will only work if there is a server. It will not work with the file:// protocol.
A language in Internation contains both a name, a dictionary and an optional direction. This example shows that a JSON file is used for the dictionary. JSON files will only work if there is a server. It will not work with the file:// protocol.

The direction can be added if you want to change the HTML reading direction when you change the language to any 'rtl' language like Hebrew or Arabic.

```javascript
Reveal.initialize({
Expand All @@ -169,6 +171,11 @@ Reveal.initialize({
fr: {
name: "Français",
dictionary: "fr.json"
},
ar: {
name: "العربية",
dictionary: "ar.json",
direction: "rtl"
}
}
},
Expand Down Expand Up @@ -218,4 +225,4 @@ And if you want to show off what you made with it, please do :-)
## License
MIT licensed

Copyright (C) 2021 Martijn De Jongh (Martino)
Copyright (C) 2022 Martijn De Jongh (Martino)
33 changes: 33 additions & 0 deletions ar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"slides": {
"examples":{
"title":"أمثلة"
},
"intro":{
"subtitle":"Reveal.js لِ"
},
"fruit":{
"title":"الفواكه",
"apple":"تفاحة",
"orange":"برتقالة"
},
"diner":{
"title":"مطعم شعبي",
"pizza":"بيتزا",
"hamburger":"هامبرغر"
},
"animals":{
"title":"حيوانات",
"dog":"كلب",
"cat":"قطة"
},
"html":{
"title":"HTML محتوى",
"paragraph":"هذه فقرة نص عادية",
"htmlparagraph":"<a href=\"#\">HTML</a> هذه فقرة نص تحتوي على عنصر "
}
},
"menubar": {
"chooselanguage": "اختر اللغة"
}
}
Loading

0 comments on commit 2341f7f

Please sign in to comment.