Topic on Extension talk:Lingo

Way to work with first word, regardless of capitalization?

4
Summary by Elcapitan68

Lingo is case-sensitive by design. Its purpose is to set and display definitions for abbreviations and Lingo meets it right way.

Zaksquatch (talkcontribs)

Hello,

This extension works great as a form of dictionary for my site. However, is there a way where I can have it work in a way of regardless of how a word is capitalized it only counts that as the "first" instance?

For instance, imagine I have the following:

;Madeupword :This word is made up.

If I wanted this to work on both MadeUpWord and madeupword, I have to add them both as separate words following semicolons. However, this is counter-intuitive to the option for only showing the glossary on the first instance of a word.

Elcapitan68 (talkcontribs)

@Zaksquatch Please, note the extension description: It lets you define a list of abbreviations and their definitions on a page and then displays these definitions whenever an abbreviation is hovered over in an article.

Since it deals with abbreviations, it is case sensitive and, by design, doesn't expect different letter cases for the same abbreviation.

Simple case shift will not solve the problem universally, as there can exist a mixed case terms (eg. "aBC" and "AbC"), etc.

Also please, look at the comment by the previous maintainer.

In your case, setting $GLOBALS['wgexLingoDisplayOnce'] = true; might help to remove the "counter-intuitive" effect, but of course, would add some clutter.

Zaksquatch (talkcontribs)

Yeah, I understand I'm using the extension for something a little different than it was intended to be used for. It was the best tool I could find for the job however! I am fine if there isn't a way around it, it was merely a question of curiosity.


Thank you for the response!

Elcapitan68 (talkcontribs)