Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using SPLIT()

Status
Not open for further replies.

timcadieux

Programmer
May 25, 2005
129
0
0
BE
Ok, i have a dilemna. I have a Field for our articles called Category. Inside, I have things ie., Car, Boat, Plane.

I allow my users to insert multiple categories, therefore, I was using Split() to read things like "car, boat". My problem is that I need to offer the same info in French. I really DO NOT want to go back and re-tag all my Articles with a new field called Category_F.

What i was hoping to perhaps do was translate each category and hopefully do something like the following:

boat|bateau, car|voiture. I guess my dilemna is first, is this a good idea and secondly, can i come up with a good Script to Split the categories and then display the English on the English page and the French on the French page!

I hope this is clear?
 
i would suggest you create a new field that has the equivalent french names...sounds logically and efficient...

-DNG
 
Are there a fixed number of categories from which users can choose?

If so you can maybe add a field to your category table:[tt]
CatID CatName FrenchName
----- ------- ----------
1 boat bateau
2 car voiture
[/tt]

Then you could just use a different SQL statement if the user if viewing the categories in french...
 
but Sheco, it seems that timcadieux is not happy with creating a new field...

-DNG
 
No I didnt mean to retag all the items... just add a new field to the table of categories... assuming there is such a thing.
 
No fixed number and i was hoping to avoid adding a new field, argh....
 
Maybe you could make a new "translation" table and query against that.
 
So that your code first grabs all existing categories for an Article and then, for each category go back and query for the translation... it wouldn't be very efficient and you'd have to compensate for the fact that perhaps there is no translation in the table... so it wouldnt be a perfect solution but it would kinda work.
 
So is the reason the title of this thread mentions the Split() function because the categories are stored in a comma separated list in a single field?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top