Translating buttons, labels, etc, in CMS 6

Vote:
 

I am trying to work out how EPiServer CMS 6 deals with multilingual support/translation of site text such as form component labels, error messages, etc. The sort of content you'd usually put in a resx. 

I really need the individual language editors to be able to edit these from within EPiServer itself. 

My thinking is along similar lines to this fairly old thread: http://world.episerver.com/Templates/Forum/Pages/thread.aspx?id=12646

#44264
Oct 07, 2010 16:44
Vote:
 

All translations are held in XML files in the \lang folder in the root of the solution. All of the language files are read into one huge DOM on start up. You can access the translated content in your mark up as follows:

<%$ Resources: EPiServer, news.morenews %>
 Where news.morenews relates to the:

<languages>
  <language name="English" id="en">
    <news>
      <morenews>More news</morenews>
      ...
    </news>
  </language>
<languages>
Element in the land_XX.xml file where XX is the language code.

There is no built in functionality to edit the XML files. However someone has developed a module for EPiServer 5 that allows editors to edit these XML files:

https://www.coderesort.com/p/epicode/wiki/ManageLanguages

This shouldn't be too tricky to convert to EPiServer 6.

#44290
Oct 07, 2010 19:06
Vote:
 

Haven't tried it but one way might be to  move the langugage xml files from the origian folder to another folder outside of the project structure. Create a VPP folder pointing to that new folder and display it in the filemanager and add user rights to it.

If it works certain trusted editors could go right in and edit the xml files.

 

 

#44304
Edited, Oct 08, 2010 6:14
Vote:
 

Be careful if you let editors do changes in the xml file. Small mistakes like a missing < or >, or a < inside the text will affect the site and editors will panic. Like David said, take a look at the ManageLanguages tool on EPiCode, it will help you going. 

#44313
Oct 08, 2010 10:11
Vote:
 

I agree, we won't be letting editors change xml files directly. 

 

One solution I have pondered is to put the values into a hidden page and use the API to request the values from within the web controls that need them.

Can anyone see any issues with that?

#44317
Oct 08, 2010 10:41
Vote:
 

Depends on how you do it. If you are planning to have one property for each text label, then you could end up with lots of properties. If you plan to have the xml in a property, then you have the same problem as if you change directly in the xml. I guess a plugin which update the xml file is the best way. Then you can control the input.

#44318
Oct 08, 2010 10:48
Vote:
 

One property for each text label is what I had in mind. 

I would divide them up in a similar way to how I would with resx files, i.e. by site page or site section + one for common terms. There will be a lot of labels on a page but then there will always be a lot of labels, won't there?

#44319
Oct 08, 2010 10:52
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.