Localization
The Localization Template demonstrates how you can use the Localizations Asset to make your Lens more inclusive around the world. The template comes with some example localized words that you can use in your own Lens!
Guide
This template allows you to quickly test out the Localization Assets. However, it is not intended to be submitted on its own. This guide will go over how you can test the provided examples of localized text, as well as how you can bring it into your own project.
Example Localized Texts
The template comes with an example Localization Assets that you can use within your Lens. It has the following text localized into a variety of languages:
- @HelloWorld: Hello {{DisplayName}}
- @TurnSoundOn: Turn sound on
- @SpeakToMic: Speak to the Microphone
- @PressRecord: Press the Record Button
- @Start: Start
- @Play: Play
- @ShowBody: Show your full body
- @ShowWrist: Show your wrist
- @TryPet: Try with your pet
- @ShowClosed: Show Closed Hand
- @ShowOpen: Show Open Hand
- @ShowIndex: Show Index Finger
- @ShowThumb: Show Thumb
- @ShowVictory: Show Victory Hand Gesture
- @ShowHorns: Show Horns Hand Gesture
- @BeCareful: Be careful of your surroundings
- @FindOpenSpace: Find an open space
- @PointFloor: Point to the floor
- @PointSurface: Point to a Surface
- @FindImageLookAround: Find Image And Look Around
- @StartDancing: Start Dancing
- @MoveAround: Move around the scene
- @MoveAway: Move away from the camera
- @MoveForward: Move Forward
- @MoveBackward: Move Backward
- @MoveLeft: Move to the Left
- @MoveRight: Move to the Right
- @DragOnScreen: Drag on the screen
- @SwipeLeft: Swipe Left
- @SwipeRight: Swipe Right
- @SwipeDown: Swipe Down
- @SwipeUp: Swipe Up
Testing the Localized text
To test out the localization of these words, in the Objects
panel, enable the different objects containing the translation.
Then, in the Preview
panel, try changing the Lens Language
being simulated.
Using the Example Localization in your own project
In the Resources
panel, right click Localizations Asset Example
and choose Export
to save a copy of the Localizations Asset
with the localized text above.
Then, open your own Lens project. Next, in the Resources
panel, press + > Localization
.
In your computer file selection window, navigate to the folder that you exported in the last step, then press Open
.
Lastly, in a Text
component, type in the keyword you are looking to use.