Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6365337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:16:48+00:00 2026-05-25T00:16:48+00:00

I would like to create a page that contains just a textarea and placeholder

  • 0

I would like to create a page that contains just a textarea and placeholder for the output text. The user would enter text into the textarea and while they type (or when the enter button is pressed) the text is translated (or more to the point – swapped out). For example, I might write something like “In my honest opinion”, or “to be honest” and that would convert the text to its abbreviated form IMHO and TBH, I thought about doing this with arrays. The text could be searched for the longer strings first, i.e. I thought about have an array of four word phrases, three word phrases, two word ones and a single array of words that can be abbreviated, they could be in “key” => “value” form. Would this work, or would mysql work better?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:16:49+00:00Added an answer on May 25, 2026 at 12:16 am

    It sounds like you’re looking to map full text into abbreviated text. This should work just like actual i18n translation, so any translation implementation would suit.

    Even if you don’t use Zend Framework, you could look at Zend_Translate adapters to see their supported mapping solutions for a suitable candidate.

    Really though, beyond telling you that mapping that key => value is definitely the way to go; how you store the map is entirely up to you.

    Updated

    $map = array(
        'in my honest opinion' => 'IMHO',
        'to be honest' => 'TBH'
    );
    
    // Really simple search/replace
    $translated = str_replace(array_keys($map), $map, $string_to_translate);
    

    This shows a really simple search/replace, but the complexity of your replacing will depend on the type of input and the type of replacement you expect

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a profile page for every account created. Once created
i would like to create a 301 from a page to the same page
I would like to create a flash presentation for a web page. It would
I would like to create an order form for my ASP.net page (I included
Is it possible/easy to create a web page which would act like a Microsoft
Possible Duplicate: JavaScript library to create div-style window within page I would like to
YouTube has URL's like these: http://www.youtube.com/watch?v=zKqeCtjFGFc When I create a PHP page mine would
I would like to create this shape using just css. I am pretty sure
I would like to create a c++ type that mimic the build-in type exactly.
I have a User Control called EmployeesCheckBoxList, which just contains a standard CheckBoxList that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.