﻿Addon name: FairLanguage
Slug: FairLanguage
Author: Syeira
URL: 
License: Public Domain

Primary Category: Chat&Communication
Secondary: Chat&Communication, RP

Summary:
Marks your speech as the chosen language, but leaves it readadble for everyone.

Description:
FairLanguage is an addon designed to bring more fairness to role-playing communication and less confusion to guilds, instance groups and raids. 
It simply circumvents the use of race specific language, instead sending every message in clear text, placing the language tag of the selected language up front. 
For role-players this enables you to tell players, which language you are speaking, while still giving them the chance to understand what you are saying and leaving it up to them if their character is able to understand you.
For everyone else the addon prevents accidents like [Darnassian] raid warnings, guild chat messages or encounter explanations.

What you CAN'T do with FairLanguage:
- Understand the Blizzard-encrypted languages you don't speak
- Encrypt what you are saying


What you CAN do with FairLanguage: 
- Speak understandable words, correctly tagged as the language you want to speak
- Invent and speak new languages! 
- Be fair and let everyone listen in on your cool role-playing scenes
- Avoid language confusion in raids.


Technical details and constraints in the current version:
- Language names can be 1 to 20 chars long
- You can learn up to 26 languages
- If your text is to long to fit the language tag into it, it will be automatically divided into two nearly equivalent long texts. Both will get the language tag.

You can control your language through Blizzard's chat language menu found at the speech bubble on the left side of your chat window, where your own, learned languages will be listed.
For easy switching between the languages you can set keyboard shortcuts 
* to toggle between your common (without a language tag) and your active/previous foreign language (with a language tag) or,
* to cycle through your learned (and Blizzard's standard) languages.
Of course, FairLanguage remembers which languages you have learned and what language has been last spoken.


----------------------------------------------------------------------------------------------------

How to use - the UI

Switching through learned languages
    FairLanguage doesn't provide additional interface elements but it makes use of Blizzard's chat language menu. You can find it on the left side of your chat window, it is the button with a speech bubble on it. In the chat language menu you can find your standard Blizzard languages and your own learned ones.
    
Learn own languages
    With the chat commands "/flc learn language", "/flc unlearn language" and "/flc unlearnall" you can control your own languages in the language chat menu. For further details please see below.
    

How to use - the chat commands

/fairlanguage, /fairlang, /flc
    are the possible slash prefixes you can control FairLanguage with.
    
/flc on
    activates FairLanguage, the replacement of the chat and reloads all previously learned custom languages into the language menu.
    
/flc off
    deactivates FairLanguage, the language menu is reset to Blizzard's default and the native language texts are send cryptic for non-native speakers. You're settings will be saved and can be restored if you activate FairLanguage again.
    
/flc help
    lists you the possible commands ingame.

/flc toggle
    alters between the common language without any tag and the active/previous foreign language.
    This command can be bound to a key.

/flc ?
    shows the currently spoken language, if you ever happen to forget what you are speaking.
    This command can be bound to a key.

/flc cycle
    allows you to cycle through your languages in the chat language menu. Also works if you have only Blizzard's default langauges set.
    This command can be bound to a key.


Using own languages

/flc setlanguage language
    sets the given language as active language. This is only temporary and can be overwritten with other. Doesn't appear in the chat language menu.

/flc learn language
    makes you learn a language. This language will appear in the chat language menu for easy access.

/flc unlearn language
    has you forget a language. This language will disappear from the chat language menu.

/flc unlearnall
    clears your language memory completely. Only the Blizzard languages will remain.
    

Examples

Command
    /flc learn Darnassian
You learn to speak Darnassian. It will appear in the chat language menu for easy access.
    
Macro
    /flc setlang Gnomish Binary
Using it will set your spoken language to Gnomish Binary.
    Syeira: [Gnomish Binary] Simple, isn't it?

and with
Macro
    /flc toggle
Your character can swith between your last spoken foreign language (i.e. Gnomish Binary like above) and your common language, even if he usually doesn't have a second language.
Human Mage: [Gnomish Binary] This language might be a little bit to theoretical for me...



----------------------------------------------------------------------------------------------------

Debug Commands
These might be needed to find and reproduce errors in the addon.

/flcdebug config
    shows the current state of the addon, ie. if you are speaking an own, native or common language, the state of the chat input box and what language you have used last. 
/flcdebug menu
    prints information on your currently learned languages and the chat language menu.
    
    
    
----------------------------------------------------------------------------------------------------

Advanced commands

Don't panic, these advanced commands aren't needed for the general use, but if you need more control of your languages you can use the following:


Further language control

/flc cyclelang language1, language2, ...
/flc cyclelanguage language1, language2, ...
    cycles through the given languages until it finds the currently spoken language, then selects the following one. If the current language isn't found, it starts from the beginning with language1.
    This languages are only temporary, they don't appear in the chat language menu.    
    
/flc ml language
/flc mlang language
/flc mlanguage language
    is useful if you want to use a specific language only once, e.g. in a macro or addon which adds speech to your spells. After the language is used your active language will be reset to the one you used before.

/flc prevlang
/flc prevlanguage
    uses your previous foreign language.
    
/flc nativelang
/flc nativelanguage
    sets your default native language (e.g. Darnassian) as active language. If you can speak only one language (e.g. Common) this will be considered your race's native language.
    
/flc commonlang
/flc commonlanguage
    uses the common language of your faction (Common or Orcish).
    

Channel control

Select the channels, where FairLanguage will be active, with   
 
/flc addchan channel 
    adds a channel to FairLanguage.
    
/flc removechan channel
    removes a channel from FairLanguage.

/flc channels
    prints the current configuration of your channels. Active channels are marked with true, inactive ones with false. Only the listed channels can be used for FairLanguage.
    Possible channels are SAY, YELL, PARTY, RAID, RAID_WARNING, BATTLEGROUND, GUILD, and OFFICER.
   

Examples for the enhanced commands

Macro
    /flc mlanguage Darnassian
    /y Stand up and fight!
    /cast [@onmouseover, help, dead] Rebirth
Everytime you use this macro you will shout "[Darnassian] Stand up and fight", before you cast Rebirth. After shouting your language will be reset to the language before. After shouting your language will be reset to the one you were speaking before.

Macro
    /flc cyclelanguage Darnassian, Kaldorei, Common
Using this macro you'll cycle from the actual language to the following one (e.g. from Darnassian to Kaldorei or from Common to Darnassian). If you were speaking neither Darnassian, Kaldorei nor common it will start with the first language, Darnassian.