Jump to content
TNG Community

How do I add a second language translation to my tng website?


Guest Tigani

Recommended Posts

Hello, I'm running TNGv11 and I'm looking into adding a second language to a website such that users can look up both English and Arabic names off the MySQL database. I believe that this can be done by modifying the searchform.php  file, however, I'm unable to find the documentation for the code. Where can I find the full documentation for the different queries and functions within the code as well as is there an alternative way of adding a second language translation to the site such that I can look up Arabic first or last name?

Link to comment
Share on other sites

Michel KIRSCH

If Arabic makes part of the supported languages of TNG, just go to Administration>>Languages then "Add New" Tab.

When language is added you have then to translate the welcome message and other parts of your home page

in Administration>>Setup>>Template settings.

Search for "Create copy in: ", Choose the language and click Go.

Then translate and copy/paste in the new text area.

Michel

 

Add language.JPG

Language create copy.JPG

Link to comment
Share on other sites

Robin Richmond

What Michel said is correct, but my interpretation of your message is that you want your data (the names of individuals) to be represented in two languages. TNG isn't designed to do that. Michel has recently created a mod called "Alternate spellings" that supports two or more family names for one person, but it doesn't support given names. However, there is a way to do alternate language searches in the Advanced Search page.

Let's say that you stored your names (the firstname and lastname fields) in Arabic.  That would allow the simple search form to find people with Arabic names. You could then define custom events called, let's say,  "English First" and "English Last" that contain the English equivalents of those names.  On the Advanced Search page, you could open up "Other events", find the English First and English Last fields, and search for English values in those fields.

That's not ideal.  But it shouldn't be hard for someone to write a mod or help you edit programs so that the simple search form would search the Firstname and English First for the first name entered by the user, and would search the Lastname and English Last fields for the last name entered by the user.

And, come to think of it, I think that a private mod I've written to add a different feature to the simple search form could be adapted very quickly to accomplish what I just described.

Tell us more specifically what you're looking for, and I'll see if I can adapt my mod to do what you want.

- Robin.

 

Link to comment
Share on other sites

one other thought -- if you have a WordPress Integration there are plenty of free plugins that can do a a wonderful job of translation. The plugin will translate all text. Not just specific areas (the drawback of the TNG language is that it can not do this easily or without extra work).  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...