SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75! 
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

How do I translate some interface elements

5 years 7 months ago #123096 by iqsafe
I have added the content type "addad" in my site and I tried to translate some built-in elements like (Choose File) Using translate interface but the search did not result in detecting this statement. The Locale module is enabled as well as the internationalization module. Is there any method for doing this translation. Is it done by importing a special file and how or is it by injecting some PHP. I am really confused and very interested resolving this issue. Thanks for all your valuable help.

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago #123133 by Valentin
Replied by Valentin on topic How do I translate some interface elements
Hi iqsafe,

You can customize some strings such as "Edit summary" with this module . Note, some buttons like "Choose file" are translated automatically by the browser and I think can't be translated.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago #123137 by steve
Replied by steve on topic How do I translate some interface elements
Hi iqsafe

Do you want to remove English entirely from your site?

If so, the Localization module is a good way to go www.drupal.org/project/l10n_update

You can import a full translation from localize.drupal.org/translate/drupal7

This would make a good tutorial for us to write, if it would help you.
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123167 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
Thanks for both you, Valentine and Steve. The Stringoverride module did not seem to work for me though I have not despaired yet. I have flushed all cashes and considered case sensitivity by copying strings exactly as is it.

Steve, regarding the module l10n_update..... I do not really understand the relationship between www.drupal.org/project/l10n_update and the importing process for localization. Will the module help import the the Arabic? My second question is: If I do the import, will this convert the Admin menu into Arabic as well, a case that I will not be able to deal with with ease. If Content of site in Arabic it is OK but not the Admin menu items. Yes, it would be great if there is some tutorial on this. However as a precautionary step, I made backup for the programs and the database as well.

Please Log in to join the conversation.

5 years 7 months ago #123172 by steve
Replied by steve on topic How do I translate some interface elements
Sure thing - I'll write a tutorial on this for you.

It's nearly the end of the day here, but we'll have it ready for you tomorrow.

Please Log in to join the conversation.

5 years 7 months ago #123173 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
That will be really great. Thank you so much.

Please Log in to join the conversation.

5 years 7 months ago #123260 by steve
Replied by steve on topic How do I translate some interface elements
Hi iqsafe

Can you give this tutorial a try?
www.ostraining.com/blog/drupal/change-language/
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago #123298 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
Thank you so much Steve for preparing this very good tutorial. I have one question here: Will this method also translate the Admin menu items of Drupal 7, a case that I would dislike because I cannot deal in other languages as far as design is concerned. Can you tell me please. Thanks a lot.

Please Log in to join the conversation.

5 years 7 months ago #123313 by steve
Replied by steve on topic How do I translate some interface elements
Yes, if you like at the last screenshot in that tutoria, it does translate the entire site into Spanish
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago #123318 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
Sorry for failing to notice the last screenshot.

Please Log in to join the conversation.

5 years 7 months ago #123329 by steve
Replied by steve on topic How do I translate some interface elements
Sure thing. Is that how you wanted it?

If not, let us know what changes are needed.
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago #123341 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
I have chosen to use CSS to hide some unwanted description in English and I also used the Translate interface to translate other translatable words or phrases. However, some words like (Browse) is stubborn for translation and another phrase like (No file selected) also refuses to be translated. I remember that for this purpose people I think use the t() function in order to make other text translatable. Am I right in this, and if so, how this is incorporated to make text translatable by the Translate Interface. Thanks

Please Log in to join the conversation.

5 years 7 months ago #123345 by Valentin
Replied by Valentin on topic How do I translate some interface elements
Hi iqsafe,

However, some words like (Browse) is stubborn for translation and another phrase like (No file selected) also refuses to be translated.

I'm afraid those words comes from the browser (are detected based on your browser language and/or geographic location), not from the site. That's why they can't be translated.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

5 years 7 months ago #123346 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
How about the t function

Please Log in to join the conversation.

5 years 7 months ago #123368 by Valentin
Replied by Valentin on topic How do I translate some interface elements
In a local installation of Drupal, some form elements uses spanish language because I'm in México, while the site is using default english:



Maybe this example would clarify your concern.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123391 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
Thank you for sending the example, and I know if I do the language import it will translate the all the built-in form elements like (Choose File.) or else on the form, but the problem here is that the import will also translate the the Admin menu a matter that I am not used to. BTW, some other elements like Save and Upload are translatable by the Translate interface. Thanks.

Please Log in to join the conversation.

5 years 7 months ago #123393 by Nick
Hi iqsafe,

Please use the Administration Language module ( www.drupal.org/project/admin_language ) to set your preferred language for the admin.

Hope this helps! Let us know if you have any questions and we'll be glad to answer.

Kind regards,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123396 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
I have not imported my language yet, do you mean that I can use this module after making the import process and set the Admin Menu back to English language by this module ? Thanks.

Please Log in to join the conversation.

5 years 7 months ago #123397 by Nick
Yes, that's correct. It allows you to set your preferred language in the admin, including the admin menu.

Kind regards,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago #123399 by steve
Replied by steve on topic How do I translate some interface elements
Hi iqsafe

A quick note of clarification ... you want the whole site in Arabic, except the Admin menu which stays in English?
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago #123403 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
Yes sir you are right

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #123407 by steve
Replied by steve on topic How do I translate some interface elements
Ok, I think I have a workaround.

You could follow the tutorial I just posted.

Then install the Administration menu in English www.drupal.org/project/admin_menu . This is actually an improvement over the normal admin.
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

5 years 7 months ago #123412 by iqsafe
Replied by iqsafe on topic How do I translate some interface elements
Clever workaround, though Nick's was also good.

Please Log in to join the conversation.

5 years 7 months ago #123492 by steve
Replied by steve on topic How do I translate some interface elements
Great, glad that worked, iqsafe :)
The following user(s) said Thank You: iqsafe

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!