saurabhd / hk_realestate

GNU General Public License v2.0
1 stars 0 forks source link

Make default value for field_object_other multilingual #39

Closed heliogabal closed 7 years ago

heliogabal commented 7 years ago

This is a long standing issue that is getting more urgent as we are about to fully utilize the site in several languages.

In the object, there is the field_object_other that holds some legal disclaimer text that rarely changes, but needs to be adoptable by an editor. Therefore, I just used the default value of the field to provide the standard text that should go there. This is working fine, except that it isn't translatable, so it can be either German or English. This is apparently a shortcoming of the Drupal 7 multilingual capabilities: https://www.drupal.org/node/2427825. https://www.drupal.org/node/2342919

There is one module which might help because it says the default value supports node and field translation, but it might be dangerous to use as apparently it overwrites existing value (not default) if it is applied to all fields. Apart from that, I didn't find much for a solution.

If you manage to make the defaults translatable, here are the default values for German and English (Russian and Chinese translations pending):

<p>Dieses Angebot ist provisionspflichtig. Bei Zustandekommen eines Kaufvertrages berechnet die Herbert + Kohlmeyer Immobilien GmbH dem Erwerber eine Provision in Höhe von <strong>7,14 %</strong> des beurkundeten Kaufpreises inkl. der gesetzlichen MwSt., sofern nicht anders vereinbart. Über die steuerlichen Aspekte informiert Sie Ihr Steuerberater. Auf Wunsch sind wir Ihnen auch gerne bei Ihrer Finanzierung behilflich. Besichtigungen sind kurzfristig möglich. Alle Angaben beruhen auf den uns vom Eigentümer zur Verfügung gestellten Informationen. Eine Haftung für die Richtigkeit bzw. Vollständigkeit können wir nicht übernehmen. Irrtum und Zwischenverkauf vorbehalten. Es gelten unsere AGB. Bitte informieren Sie sich über deren Inhalt auf unserer Homepage unter <a href="https://www.herbert-kohlmeyer.de/agb" title="www.herbert-kohlmeyer.de">www.herbert-kohlmeyer.de/agb</a>.</p>

<p>This offer is subject to commission. Upon the final sales agreement Herbert + Kohlmeyer Immobilien GmbH charges a commission of <strong>7.14 %</strong> on the final sales price including VAT, unless otherwise agreed. Your tax advisor can inform you of relevant tax considerations. If you should so desire we can be of assistance with the financing of the property. All details are based on information provided to us by the owner. We assume no liability for accuracy and completeness. This offer is subject to error and prior sale. This offer is subject to our General Terms and Conditions (AGB/Allgemeine Geschäftsbedingungen). Please refer to the content of our <a href="https://herbert-kohlmeyer.com/general-terms-and-conditions" target="_blank">General Terms and Conditions</a> on our website (www.herbert-kohlmeyer.com).</p>

darshi-shah commented 7 years ago

Hi Rainer,

This change is done and pushed on develop branch. Please add/edit object in German site, you will see string in english, refresh strings after that and you will be able to translate it.

Thanks Darshi

heliogabal commented 7 years ago

Closing this, can go to master.