Drupal modify translation of error message - drupal

i have an English Drupal installation but the frontend needs to be dutch. Now i asked a few weeks ago if it's possible to install a different backend and frontend language but this seems to be difficult. Now i only have one small message that isn't translated yet in the frontend and this is the required field error message (... field is required). How can i edit this translations? The may be an easy not so clean solution.

If you want an english backend and Dutch frontend you should use admin language that should fix that problem for you. In regards to translating the field required, that should be simple enough. It use a placeholder, so you might need to look for something like
#field is required
Drupal use this system when it use the same string with a dynamic value so you only need to translate it once and not for every combo.

thanks, for the admin_language module, but i found how to do this simple translation. You can override the translations using 'String overrides' ins settings.php

Related

Translate Wordpress Automatically from Multiple languages to English

There are a lot of plugins to translate Wordpress from e.g. English into German/French/Spanish etc.
But i am looking to achieve the opposite, i want to gather some international content and translate it automatically to English. Content will be added through WP All Import or through other import.
I will have the "international language code" per content available, so i could indicate the source language of the content.
I have reached out to several WP translation plugin developers, but they told me the plugin only work from one language to multiple others and not the other way around.
What would be the best way to get my Multilanguage content to English? I was thinking following options:
Have a custom extension to WPAI developed that translates on import, but the downside is that it is slow with higher volumes.
Perhaps it would be possible to have the content translated to English (if not available) when the page actually loads, and store the result in a column for future usage.
I don't know if above would be even possible, perhaps someone has some pointers on where i can search to find a solution for my case.
Have you tried the Loco translate plugin ? I know this looks like to be the opposite of what you are trying to do but this extension lets you select what theme, plugin and even specific strings you want to automaticaly translate. You can also add configuration files to translate anything on your website as you want.
Let me see if I understand correctly. You will have content in languages X, Y, Z (post in X, another post in Y, another in Z) and you want to separately translate each to English (E) like this?
X -> E
Y -> E
Z -> E
Or are you looking to somehow merge all the source languages into one (X,Y,Z -> E)?
If option 2 I have no idea how this would be done.
If option 1 then IMHO it doesn't matter from what and to what you want to translate. The question you need to answer is:
Which plugin(s) is(are) capable of automatically translating from all your source languages into English? For example here's a list of supported languages for WPML: https://ate.wpml.org/mt_langs
Once you import all the content into WordPress with the correct language codes which the translation plugin can recognize (to correctly perform machine translation), you will be able to translate each post/page into English using that plugin.

Can I use Paymill Gateway with multiple languages?

I would like to purchase the product Paymill Gateway for one of our customers. His website comes with 3 different languages: German, English and French
As far as I know Paymill supports these 3 languages but how exactly would that work? Can I only CHOOSE between one of those languages or would the details of the page automatically get translated whenever the user switches the language of the website?
I hope somebody has experience with this plugin and can update me with some details.
you should consider trying out the free but official alternative on https://wordpress.org/plugins/paymill/
In the official plugin there are several language packs included which are loaded depending on your language settings in WordPress. The plugin WordPress MultiLanguage can help to serve different languages and switching between them.
Please also note that support requests may be faster handled on official support forum https://wordpress.org/support/plugin/paymill
If you are using the paymill.createToken function, validation happens in JavaScript. The function passes an error object in its callback; the error code can be accessed through error.apierror.
You can build a language map to display the error message in different languages. For example:
var messages={
'en':{
'field_invalid_card_number':'Invalid Card Number',
'field_invalid_card_exp': The card has expired'
},
'de':{
'field_invalid_card_number':'Ungueltige Kartenummer',
'field_invalid_card_exp':'Die Karte ist abgelaufen'
}
}
Then with some additional logic you may display the suitable target language.

internationalization website

I am use this example to internationalize my website.
The admin can create new topics in English, and I want to show the same topic in Spanish.
How can this be done?
it isn't standars works like Register or other to do that
Html.ActionLink(Resources.Register, "Register")
The admin can create topics - this means that content is dynamic, therefore you can't use resources files any longer. You should structure your database to support localization. Then you would have to read language locale from thread that's currently being executed.
Additionally, you may let user to select his language. In this scenario you will store selected language in a session and retrieve localized data from the database based on language locale in the session.
Finally you can write code to read first default language in a web browser. For example, change your language to hungarian in a web browser and go to google, see what happens.
You should use Localization and Globalization, take a look at http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx

could i add some variables into the drupal node body?

when i create an article useing the story type,could i add some variables into the body's textarea.then can invoke the variable and output it. thank you.
the drupal version is 6.
Inserting textual placeholders to be replaced by actual values on render is the purpose of the filters system in Drupal. Token filter provides, well, token replacement and is an handy tools if your need replacement for tokenized values. But there are plenty of filters for Drupal 6.x and you can even define your own in a custom module. The Custom filter can help for this. You can also use token filter and define your own token in your custom module.
A simple solution is to use the PHP filter but this is a insecure way of doing it. Also, putting PHP code in node (or any content) is a maintenance nightmare and a bad habits. You would be better doing it properly from the start.
Contrib modules would be the way to go, unless you feel comfortable with PHP in which case you can just use the PHP filter. Depending on what variables you need you can try one of:
http://drupal.org/project/InsertNode and http://drupal.org/project/token_filter
There are a couple of others (I like insert view) but they're currently not marked for production use.

Zope Plone 3.1.2 - export all users with email addresses

I have been running zope / plone site for about a year now - it seemed to be a pretty fast way of getting a CMS up and running and it's a great job for this - it's running 3.1.2 of plone. I am in now way a zope or plone expert (in fact the more I read about it - the less I know I know!) , but I am handy at python.
I have tried to export the users as xml - it fails with the unicode / id bug. I have tried export as a zexp file, but I can't actually find out how to read this file (I have tried import zope etc but I don't know what to do next !
I have found scripts that run listing all users, but these are for zope2 and, if I am honest, I wouldn't actually know how to install them anyway.
Can someone please either
1) tell me how to fix the id / unicode xml export bug? And please tell me in ways I can do directly on the site ?
or
2) show me how to read and zope zexp file and do something simple like put it into a dict ?
I didn't know so many people were going to sign up for using my site and now I wish to move the email list management to another system - hence the requirement for the export.
Thanks in advance,
Richard.
Another way of extracting the email addresses of the users:
Go to the root of the Plone site in the ZMI.
Add a "Script (Python)".
Come up with a nice id e.g. "export_email".
Click on "Add and edit".
Replace the code in the text field with the code listed below.
Don't forget to save your changes.
Go to the "test tab".
The code for the script:
for member in context.portal_membership.listMembers():
print member.getProperty('email')
return printed
OK - I'm going to put an answer here anyway, just in case anybody else ever gets stuck with this issue.
It's a cheat really, but I edited the /portal_skins/custom/prefs_users_overview and changed the line below from :20 to :2000 and then just did a simple user search, and then I HTML scraped the mailto: addresses.
b_size request/b_size | python:2000;
If anybody else finds this useful, let me know !

Resources