Skip to content

The MMM-TranslatedMessages module translates a given list of messages that the user inputs to the desired language that is configured.

License

Notifications You must be signed in to change notification settings

ahmedwab/MMM-TranslatedMessages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module: MMM-TranslatedMessages

License: MIT

The MMM-TranslatedMessages module translates a given list of messages that the user inputs to the desired language that is configured.

Display

Installing the module

Access your Magic Mirror/modules folder

cd ~/MagicMirror/modules/

Clone this repository in the modules folder

git clone https://github.com/ahmedwab/MMM-TranslatedMessages

Retrieving a Google API KEY

1. Go to the following website https://cloud.google.com/translate
2. You will want to create a new project
3. With the new project, visit API & Services
4. Enable Google Translate API
5. Create a new API key
6. Store/Copy your API key for the next part 

Using the module

You will need to make adjustments in your config/config.js file:

modules: [
		{
			module: 'MMM-TranslatedMessages',
			position: 'top_right',
			config: {
				intervalTime: 5, //Time interval between messages
				fade: 3, //Time in Seconds it takes to fade away each message
				Messages:[ //Messages you want to input to be translated
					"Hello World","How is it going"],
				API_KEY:"GOOGLE_TRANSLATE_API_KEY", //Google translation API Key
				targetLanguages:["fr","en"], //Target Languages Example: French:fr English:en
				fontSize: "1.1em" //Font Size of the text
			}
		},
]

Configuration options

The random_quotes module allows you to pick quotes randomly from all the provided categories, or you can set it to only use one category. Specifying multiple categories is curently not supported.

Options Description Default
intervalTime Time interval between messages Integer Value is in seconds. 5 seconds
fade Time in Seconds it takes to fade away each message Integer Value is in seconds. 3 seconds
Messages Messages to be translated (Array type) Messages:[ "Hello World","How is it going"]
targetLanguages Languages the messages should be translated to Example: French = fr targetLanguages:["fr","en"]
fontSize Font Size of the displayed messages "1.1em"

Stylesheet

Stylesheet could be found under MMM-TranslatedMessages.css

Any style changes can be produced there

Contributing

Contributing is greatly encouraged.

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

About

The MMM-TranslatedMessages module translates a given list of messages that the user inputs to the desired language that is configured.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published