We are preparing a new source of documentation for you. Work in progress!

Difference between revisions of "Localization examples"

From Resco's Wiki
Jump to: navigation, search
(Hub item on home screen)
(Rename views)
Line 20: Line 20:
  
 
Views are internally identified by their names. As a result, renaming views is tricky; see [[View#Best_practice_in_renaming_a_view|the best practices]]. In this example, we use localization to change the label of a view in the app.
 
Views are internally identified by their names. As a result, renaming views is tricky; see [[View#Best_practice_in_renaming_a_view|the best practices]]. In this example, we use localization to change the label of a view in the app.
 +
 +
# In [[Woodford]], go to '''Entities > Contact''', click '''Show UI''', and create a new view. Give it a unique, one-worded name, for example "USContacts".
 +
# Go to '''Design > Localization''', find the string for this new view and click '''Edit Project''' to enter a localized label. <br> [[File:Rename view using localization.png|600px]]
 +
# Result: <br> [[File:Renamed view in action.png|250px]]
  
 
== Change names of view buttons and commands ==
 
== Change names of view buttons and commands ==

Revision as of 12:26, 4 December 2019

Entity item on home screen

In this example, we rename the title and subtitle of an entity on home screen, add a custom icon for the item.

  1. In Woodford, edit the home screen. Select the entity and click Rename. Use a unique one-word string, for example, "CustomAccount".
    Rename item on home screen.png
  2. Select Design > Localization from the Administrator menu and edit a language, Click Add to add a new localization string. As the ID, use "HomeTitle.HomeItemName"; in this particular example, "HomeTitle.CustomAccount". Add another string for HomeSubTitle.CustomAccount.
    Home title custom strings.png
  3. If you want to change the icon of the home screen item, select Design > Images from the Administrator menu. Go to the Home directory and click Add to add a new image. As the image name, use the name you used in step 1, for example "CustomAccount".
    Home item localization result.png

Hub item on home screen

In this example, we create a new hub, add it to the home screen with a custom label and icon.

  1. In Woodford, go to Components > Entity Hubs and create a new hub. Give it a unique, one-worded name, for example "myHub".
  2. Go to Components > Home screen and add the new hub to your home.
  3. Go to Design > Localization and add new strings. As the ID, use "myHub" for the title and "myHub.SubTitle" for the subtitle.
  4. Go to Design > Images and add the new icon to the Home directory. Use "myHub" as the name.
    Adding a custom icon for hub.png
  5. Result:
    Home item localization result.png

Rename views

Views are internally identified by their names. As a result, renaming views is tricky; see the best practices. In this example, we use localization to change the label of a view in the app.

  1. In Woodford, go to Entities > Contact, click Show UI, and create a new view. Give it a unique, one-worded name, for example "USContacts".
  2. Go to Design > Localization, find the string for this new view and click Edit Project to enter a localized label.
    Rename view using localization.png
  3. Result:
    Renamed view in action.png

Change names of view buttons and commands

TBD