Can we translate the Page URLs using Language Copy in AEM? - aem

We are planning to use the Language copy feature for the translation of our English content and have done a small POC using Microsoft trial translator.
We noticed that the created language copy has the URL structure in the English language itself. Let's say if we create a language copy of /content/site/en/test-page, it will create it as /content/site/es/test-page, which is correct but the URL of the Spanish page would be in English. But we want to translate the URL as well for the Spanish language copy. So it should be /content/site/en/página de prueba (in Spanish)
Is it achievable to translate the URL of the page using language copy? what are the different options here?

AEM needs pages to have the same path (and name) after the language node in order to see that this is / should be a language copy. So changing the node name is not an option in your case. In addition to that, changing a page name will be regarded as a move event in AEM and in the end, AEM will not be able to connect your language copies any more.
You can change the alias instead, which is in the page properties in the "Advanced" tab (see https://docs.adobe.com/content/help/en/experience-manager-65/authoring/authoring/editing-page-properties.html for further explanations). If you have spanish aliases for all spanish pages, then your URLs will be using those spanish aliases which is exactly what you would like to have, I guess...
HTH,
OliG

Related

How to Translate text coming from server in Flutter?

I am facing translation problems in Flutter. I am using internationalization features in my app to give additional language options to users. I managed to translate app texts but failed with the texts coming from the server. When users choose the language they can add their profession (the List of the professions) for ex. in Italian which is saved in the server and when another user chooses the English language they shouldn't be able to search in English to find this user. How I can achieve to translate texts coming from the server or is there any option to choose a different path? Thanks in advance
Flutter internationalization can not translate dynamic words which are coming from anywhere else, except the words you translated yourself manually. Google Translate uses machine learning to translate one word to another. You can the Google Translate API to translate the word before adding it to the server database and save both words on your server database. Then display the word based on whichever Locale is selected by the user.

When using PWA Shortcuts, is it possible to localize the shortcut name?

Our PWA is used globally and is localized for users.
If we use PWA shortcuts, is it possible to localize the shortcut names in the manifest.json file?
https://web.dev/app-shortcuts/
For example, if we had a shortcut called "Search", I would want that to appear in Japanese "検索" for a user with a Japanese language set in their operating system.
There's no way to specify different language strings in the manifest today, the only way to do it would be to serve a different manifest depending on the language of the users browser.
There are two options for doing that:
Have the server return a different manifest file depending on the Accept-Language HTTP header sent by the users browser.
Add (or update) the manifest link in the page after checking the users preferred language.
Personally, I'd recommend the first option. The manifest file name would remain the same for all users, and it would require no client side code and wouldn't affect page performance in any way.
The second would require JavaScript to update the manifest link, and while not expensive, the less client side code you run, the better. It also means each language would have it's own manifest file, so if I change my browser language, I may be prompted to install the PWA again because it's now a new manifest.

Trying to update the content of language copy in AEM

I was having a website with en and having pages under it.Now i created another language copy named French (fr).I have made some changes in my English copy,how can i update the same changes from one language copy to other.
#Shivani
Making a language copy just copies the content from source(en) to the new language(fr). If you want changes in en page to reflect in the copied pages fr pages automatically, you will have to create fr pages as live copy of source(en) page and specify appropriate rollout configs while creating a live copy.
Of course, if it's a text in english that is modified at source, this will not automatically translate to french text. Live copy will copy the modified english text to the french page, content reauthoring in specific language is required. But for images and assets in general, live copy will work out.
You can refer this for more info.

How to create different versions of a site in Liferay?

I have built my site with default language being in Spanish and now I want to build the English version of it. I have added the link 'In English' to the Spanish site, and when clicked takes me to www.example.com/en. The control panel on the English site converts to English as well, which is fine. Then I try to translate the contents from Spanish to English.
Here is what I do: let's say I take the 'Contact' menu, where I have the contact page. In the URL then it looks like this: www.example.com/en/contact. Through Edit, I go to the text editor, localize the language to English, change the title and the content of the page into English and save it in a hope to see the changes on the English version only, but the change is also shown on the Spanish version, that is it overrides the Spanish version, which means that the page is the same on both the language versions. I thought the copy that is under www.example.com/en/contact is a different instance of the web content than that on www.example.com/contact, but I was wrong.
The question is how to create the English version of the site then? Should I copy the whole site's theme into a folder e.g. /en and make the changes from there? or there is another way to do this?
1: Create a content
2: Add tranlation
3: Put tranlation
with www.example.com/en/contact, www.example.com/bg/contact, etc. you can see the tranlation.

internationalization of an iPhone Application

I am new to iPhone App development (I am using XCode 4.2) and I was wondering if there is a way to translate all the strings , caption etc ... internally without having to translate them one by one .
an idea I have in mind is to use NSUserDefaults to save the language as a global variable and translate everything accordingly
another option is to make a look up table (is it even possible in Objective-C ?)
Thanks
You can use NSLocalizedString(#"<#key#>", #"<#comment#>") and one file (named Localizable.strings( per language. If you use the above function you can use the App Linguan (available on the Mac App Store) to generate the Localizable.strings files.
There is also a command line tool called genstrings that will create the file for you, but believe me that Linguan app will pay for itself in minutes.
You should always add a comment to allow a better translation and to provide context about the key.
You can read a step-by-step tutorial of the process here:
iPhone Localization Tutorial
Here's a high-level overview of the basics (the above tutorial has details):
1) Change all your coded strings to call: NSLocalizedString(#"My text", #"Context for the translator")
2) Export all your strings using the genstrings Terminal command.
3) This creates a text file called Localizable.strings with all your English (source) strings. It looks like this:
/* Context for the translator */
"My text" = "My text";
You send that file to the translators. They'll translate the right side like this: "My text" = "Mi texto";
4) You place each translated Localizable.strings file in its proper language folder: en.lproj, fr.lproj, es.lproj, etc.
When your app loads on the iPhone it will check the user's language settings. If the user has chosen French as the system language, the Localizable.strings inside your fr.lproj folder file will load. If there are any untranslated strings, it just defaults to English (or whatever your source language is) for those.
It's worth following the whole tutorial and note that the file/folder names have to be exact!
Look up the documentation for NSLocalizedString. And how to localize your .xib files (you make localized copies in English.lproj, de.lproj, fr.lproj, etc.).
All you will have to create are the files with the key-value pairs for each language you want to translate and name them accordingly i.e. _en, _fr and so on.
Then all you have to do is send a message to this method:
NSLocalizedString(#"myKey", nil)
And this will return the localized String, in whatever language the current iPhone configuration is.