eZ Community » Forums » Install & configuration » Update translation
expandshrink

Update translation

Update translation

Wednesday 10 December 2014 11:21:33 am - 3 replies

Hello,I've installed eZ Publish on version 5.3 using French language.I want to change translations of original website (ezdemo) but when I change into this folder

:/projets/pim/home/pimcms/cms/ezpublish_legacy/extension/ezdemo/translations/fre-FRto

this :

 

         <source>Get in touch</source>
        <translation>Contacts Utiles</translation>

I still have the english translation on my website.I tried clearing all caches but no success...I found another file into the /var/storage directory. Do I need to change it ? Why it doesn't use my file ?Thanks

Modified on Wednesday 10 December 2014 11:23:53 am by Martin M

Wednesday 10 December 2014 11:55:58 pm

Hello Martin,

You should not make changes to the ezdemo extension.

Instead you should make a custom translation extension with which to customize translation strings.

remember to add to your custom translation extension, customextensionname/settings/site.ini.append.php

[RegionalSettings]
TranslationExtensions[]=customextensionname

Also you should change your siteaccess site.ini.append.php values for default translation language to use french instead. Here is an example (not tested)

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
SiteLanguageList[]=fre-FR
TextTranslation=enabled

It's a little complicated to setup at first but once setup correctly it should work just fine. 

I hope this helps!

Cheers,
Heath

Modified on Wednesday 10 December 2014 11:56:27 pm by // Heath

Thursday 11 December 2014 2:37:27 pm

Thanks fpor your reply.

I found this thread : http://share.ez.no/forums/setup-design/multilingual-static-texts-how-to-reuse-and-customise

So if I add this translation extention, I'll have to hcange all translations in layouts like :

{'Example'|i18n( 'extension/mytranslationext' )}

I want to keep the "ezdemo" website and modify it.

 

Thanks

 

Martin

Thursday 11 December 2014 10:08:44 pm

Hello Martin,

That thread is a bit old and slightly unclear in your use case / situation. What Łukasz shares is very helpful though Xavier was a bit confused all around. In any case moving forward ...

You should not need to modify any templates to override the default translation strings provided by ezdemo.

This level of customization has been provided for as I described above.

You should only need to order your translation extension ABOVE ezdemo in priority in your site.ini ActiveExtensions settings. With your translation extension above in priority it should override the translation strings of ezdemo extension.

Remember to use the text translation string key 'extension/mytranslationext' within your translation strings (in the translation .ts file) to correspond with the template usage of this string.

Alternatively if your making a lot of changes to ezdemo templates or other extension internals it's ok to make a renamed copy of ezdemo extension and edit it as much as you like but that is often more complex to maintain and not necessary. 

Again please remember it is very very bad idea to ever edit the ezdemo extension as it is simply not necessary or wise to do so (seems simpler but long term it's a maintenance nightmare and strongly strongly discouraged). 

I hope this helps!

Cheers,
Heath 

Modified on Thursday 11 December 2014 10:11:46 pm by // Heath

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from