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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:29:39+00:00 2026-05-27T23:29:39+00:00

so there will be 2 arrays. One is fixed: $array1 = Animation => Animācija/Multfilmas,

  • 0

so there will be 2 arrays. One is fixed:

$array1 =     "Animation" => "Animācija/Multfilmas",
"Multiplication" => "Animācija/Multfilmas",
"Action" => "Asa sižeta filmas",
"Detective" => "Detektīvs",
"Documentary" => "okumentālās filmas",
"Drama" => "Drāma",
"Adventure" => "Piedzīvojumu filmas",
"Comedy" => "Komēdija",
"Crime" => "Trilleris",
"Thriller" => "Trilleris",
"Fantasy" => "Fantastika / Sci-Fi",
"Sci-Fi" => "Fantastika / Sci-Fi",
"Family" => "Ģimenes filmas",
"History" => "Vēsturiskas filmas",
"Horror" => "Šausmu filmas",
"Musical" => "Mūzikls",
"Music" => "Mūzikls",
"Romance" => "Romantika",
"Mystery" => "Mistērija",
"Sport" => "Sports",
"Western" => "Vesterns",
"War" => "Kara filmas"

and second one will contain something different each time, let me give 2 random examples of what it can contain:

$array2 = "War", "Western", "Romance"

or

$array2 = "Comedy", "Drama"

OK, so the idea is to make a function that changes “Comedy” to Komēdija etc (translating)
and if on the end there are 2 identic values, make it one, because Crime and Thriller both are being translated as Trilleris, so if a movie has both genres it will show up as Trilleris, Trilleris once translated and thats kinda stupid.

  • 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-27T23:29:40+00:00Added an answer on May 27, 2026 at 11:29 pm
    function translate($words, $dictionary)
    {
        $return = array();
        foreach($words as $word)
        {
            $return[ $dictionary[$word] ] = $dictionary[$word];
        }
    
        return $return;
    }
    

    $dictionary is the big array while $words is the array containing the words to translate

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

Sidebar

Related Questions

Is there a built in function in .NET 2.0 that will take two arrays
I have two processes one will query other for data.There will be huge amount
Probably a simple one for you : I have 2 arrays $array1 = array(
There will be a thumbnail as a left float, followed by the title and
If there will be a small number of files it should be easy with
Or there will be some conflicts ?
I guess there will be a very simple answer to this. But here goes.
During this year there will be coming couple sub-600€ multi-touch portable computers that contain
I just wonder whether there will be any conflict if two service intents are
I want to make a webapplication in witch there will be some users with

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.