Localize Your Partner Finder Application for Multilingual Support
This topic describes how to localize your Partner Finder application for multilingual support.
How You Create Localized Partner Finder Applications
You can create localized versions of your application by translating the UI text and messages in your application into other languages. The localized strings are displayed in the application during runtime. When you run the staged or published application, a localized version is displayed based on the language settings of your browser.
A Partner Finder application created using the Partner Finder template includes translations to the 24 languages listed below. While the template is delivered with these translated strings and files, any modifications that you apply to the strings in your Partner Finder application will require additional translation.
The supported language locales are as follows: cs
, da
, de
, es
, fi
, fr-CA
, fr
, hu
, it
, iw
, ja
, ko
, nl
, no
, nl
, pt-BR
, ro
, ru
, sk
, sv
, th
, tr
, zh-CN
, zh-TW
.
The resource bundles provide an initial set of translated strings for the majority of the application that you can use for your own translation files. To populate the rest of the translation files for the languages you want to support, follow the instructions for generating files for new languages, and then use the existing translated files to obtain translations for use in your new file.
The Partner Finder template comes with a single, application-specific bundle. If you create strings, then you must add the translations to the bundle, or create bundles.
For comprehensive information about adding translated text to your application, refer to the Work with Translations topic in the Develop Applications chapter of the Developing Applications with Oracle Visual Builder guide in the Related Topics section.
Create Translations for New Languages
You can introduce a new language beyond the ones delivered with a Partner Finder application that was created using the template.
For more information, refer to the Work with Translations topic in the Developing Applications with Oracle Visual Builder in the Related Topics.
To introduce a new language beyond the ones delivered with a Partner Finder application that was created using the template, follow these steps:
-
Sign in to Oracle Visual Builder.
-
Open your Partner Finder application.
-
Click the Menu icon in the editor, and select Settings.
The Settings tab appears.
-
Click the Translations secondary tab.
-
Download the latest language bundle by clicking the
ARB
orXLIFF
download link in the Download all strings section.Both formats are supported and you can click either download link.
A
zip
file is downloaded. -
Extract the
zip
file. -
Open the
partnerfinder_app
directory. -
Rename the
app-strings
file toapp-strings-<locale>.arb
orapp-strings-<locale>.xliff
, depending on the downloaded file type. Replace<locale>
with the language locale.For example, for a file containing Welsh translations, the modified file name should be:
app-strings-cy.arb
orapp-strings-cy.xliff
. -
Open your
app-strings-<locale>
file in a text editor. The first few lines of the file will resemble the following:{ "@@x-bundleName" : "app", "@@x-bundlePath" : "webApps/partnerfinder/resources/strings/app/nls/app-strings", "shell_footer_signin_to_partner_portal" : "Sign in to Partner Portal", "@shell_footer_signin_to_partner_portal" : { "description" : "Link to separate Partner Portal application.", "source_text" : "Sign in to Partner Portal" }, "shell_footer_subscribe_to_emails" : "Subscribe to Emails", "@shell_footer_subscribe_to_emails" : { "description" : "Link to subscribe to company email updates.", "source_text" : "Subscribe to Emails" }, "contactform_cancel_button" : "Cancel", "@contactform_cancel_button" : { "description" : "Button label that displays on the partner inquiry page. Users can click this button to cancel their partner inquiry.", "source_text" : "Cancel" }, "contactform_submit_button" : "Submit", "@contactform_submit_button" : { "description" : "Button label that displays on the partner inquiry page. Users can click this button to submit their partner inquiry.", "source_text" : "Submit"
-
Replace the English strings with the translation for the language you're creating. Consider the following
Cancel
string:}, "contactform_cancel_button" : "Cancel", "@contactform_cancel_button" : { "description" : "Button label that displays on the partner inquiry page. Users can click this button to cancel their partner inquiry.", "source_text" : "Cancel" },
You would want to replace the string after the
"contactform_cancel_button": "
with the translated language equivalent. In this example, you would want to replace the stringCancel
with the Welsh equivalent for Cancel, which isCanslo
. The modified text will look similar to the following:}, "contactform_cancel_button" : "Canslo", "@contactform_cancel_button" : { "description" : "Button label that displays on the partner inquiry page. Users can click this button to cancel their partner inquiry.", "source_text" : "Cancel" },
-
Repeat step 10 for all the strings in the language that you're creating.
-
Save your
app-strings-<locale>
file. -
Add the
app-strings-<locale>
file to thezip
file that you downloaded in step 5, and save the updatedzip
file. -
Click the Menu icon in the editor, and select Settings.
The Settings tab appears.
-
Click the Translations secondary tab.
-
Upload the
zip
file that you saved in step 13, containing your newapp-strings-<locale>
file, to the Upload updated bundle section.The language is added to the bundle.
-
Navigate to Web Applications > partnerfinder > Flows > partner-finder > Resources > strings > app >
nls
> { } app-strings.json. -
In the { } app-strings.json file, add an entry for the new language that you're adding. For example, append the following line to the .json file:
"cy" : true
Add or Update String Translations for Existing Languages
You can translate additional strings after modifying strings in your Partner Finder application generated from the template.
For more information, refer to the Work with Translations topic in the Developing Applications with Oracle Visual Builder in the Related Topics.
To add or update string translations for existing languages:
-
Sign in to Oracle Visual Builder.
-
Open your Partner Finder application.
-
Click the Menu icon in the editor, and select Settings.
The Settings tab appears.
-
Click the Translations secondary tab.
-
Download the latest language bundle by clicking the
ARB
orXLIFF
download link in the Download all strings section.Both formats are supported and you can click either download link.
A
zip
file is downloaded. -
Extract the
zip
file. -
Open the
partnerfinder_app
directory. -
Open any
app-strings-<locale>
file in a text editor.For example, if you added a string and now want it translated to French, then open
app-strings-fr.arb
orapp-strings-fr.xliff
. -
Add the new French string to the file.
Let's say you added a
Submit
string to your application and now want it translated to French.Add the string with the translated language equivalent to the file, as follows:
}, "contactform_submit_button" : "Soumettre", "@contactform_submit_button" : { "description" : "Button label that displays on the partner inquiry page. Users can click this button to submit their partner inquiry.", "source_text" : "Submit" },
You can also modify the translation of an existing string in this file.
-
Repeat steps 8 and 9 for all the languages that are relevant to your application.
-
Save your
app-strings-<locale>
file. -
Add your new English string to the English-only
app-strings
file, as well. -
Add the
app-strings-<locale>
file to thezip
file that you downloaded in step 5. Also add the revisedapp-strings.arb
orapp-strings.xliff
file, depending on the downloaded file type. Save the updatedzip
file. -
Click the Menu icon in the editor, and select Settings.
The Settings tab appears.
-
Click the Translations secondary tab.
-
Upload the
zip
file that you saved in step 12, containing your modifiedapp-strings-<locale>
files, to the Upload updated bundle section.The language bundle is updated with the new string translations for the existing languages that you modified.
Organize Non-Translated Strings
If you have strings that don't require translation,
such as product names or company names, then add such strings to the shell-strings.arb
or shell-strings.xliff
file in the partnerfinder_shell directory.
(You get the partnerfinder_shell directory when you download the latest
language bundle.) Follow this best practice to more easily distinguish
between translated and non-translated strings.