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 8622425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:03:04+00:00 2026-06-12T07:03:04+00:00

I working on a website and have a mysql-table called ‘items’, like: item_id |

  • 0

I working on a website and have a mysql-table called ‘items’, like:

item_id | item

(The second column is just for identify the item_id.)

In a language1.php I store a array with the item_id and the name of the item itself in language1, like:

$items = array(
1 -> 'Apple',
2 -> 'Orange',
...
);

Depending on the language of the user, the correct language-file is included.

There should be an autocomplete-input-box for the items-array (< 1000 items/ array). I guess, its not a good solution, to search the array in the language1.php with php (“search_array” or some function like this), but i think there is no way to maintain this system and search by mysql, isn’t it?

How are you store different languages for websites and make them searchable?

Is it necessary to store all languages in a specific column in mysql?

  • 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-06-12T07:03:05+00:00Added an answer on June 12, 2026 at 7:03 am

    I would probably add an items_localization table with columns like

    item_id,
    locale,
    content, (in your base language of choice)
    translation (the translated content)
    

    that has a foreign key to item_id, and either a compound primary key on item_id, locale, or an autoincrement id field and a unique index on item_id, locale. Some folks like working with single-column, autoincrement primary keys because of the framework they are working with, so if this describes you, use the latter solution.

    Alternatively if you wanted a wider localization solution you could just have a localization table with columns like

    localization_id,
    locale,
    content,
    translation
    

    that can store any sort of localization. Then you items_localization table could just be a many-many join table with columns like

    item_id,
    localization_id
    

    You could just do a join query to get the localization you are looking for. For using the first proposed table structure:

    SELECT i.*, il.translation
    FROM items AS i
    INNER JOIN items_localization AS il on i.item_id = il.item_id
    WHERE il.locale = ? AND il.translation LIKE "%?%"
    

    Where you substitue your values for current locale and the autocomplete search phrase for the ?‘s.

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

Sidebar

Related Questions

I have working website in PHP with a MySQL backend which has several tables
My team working on a php/MySQL website for a school project. I have a
Working on an AJAX website (HTML,CSS,JavaScript, AJAX, PHP, MySQL). I have multiple javascript functions
I have a mysql db with 10 tables. Each table drives a website where
I have a working website, where I use this expression everywhere. price.ToString(C) It currently
I'm working on a website and have been using absolute positioning, since the viewport
I am working on a website where I have a main div . I
I am currently working on a website that will have a high volume of
Here's what I am working on. At my website I have multiple processes with
I have been working on a website that has some images that I need

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.