Magento - Attribute display admin value in front end no matter what language i pick - magento

In the back-end when managing the attribute from the attribute set i show him what text to display for the languages i have (Romanian And russian are currently active and important)
http://prntscr.com/32rhrm
However in the frontend as in Romanian Language so in Russian language it will layout the text that i input for the Admin in the attribute set
http://prntscr.com/32rhxz
how do i fix it?! how do i make it show the corresponding text for the needed language?
Thank you !!!

Related

NestJS with language change based on URL

I'm trying to do a language change with NestJS. Example,
if user type in URL:
www.blabla.com/en <-- text in the page will show english
www.blabla.com/cn <-- text in the page will display in chinese font
www.blabla.com/jp <-- text in the page will display in japan font
I read about i18n but not sure how is the logic to do in NestJS. Please kindly help. Thank you.

TYPO3 create links and respect language of target page (Fluid, typolink)

we have a webpage, where not all pages are translated. So many pages are only available in english and some special pages (country landing pages) are translated to various languages.
From these special translated pages I want to create links automatically converted to the default languages if the target page is not translated.
In menus (HMENU) "protectLvar = 1" works fine for me.
But how can I achieve this in normal typolinks or fluid "<f:link.page uid="..."> without manually dealing with the language ?
I'm on typo3 9.5.
Sample:
I have the following polish URL:
mydomain.com/pl/poland/
All the links from this page should go to "/en/subpage-xy/" because the above page is the only page translated to "pl". But actually all links go to "/pl/subpage-xy/" regardless if pages are translated to "pl".
The content-fallback mode leads to displaying english content under a /pl/-URL. I don`t want to change the fallback mode - I only want the links to be created to available language of the target page.
Is this possible ? Many thanks for any hints.
I think that you can't achieve what you want with default behavior.
I suggest you to wrote your own view helper based on <f:link.page> and in that view helper, you can check with a request in the DB if the page exist for the current language and switch to English if that's not the case.
I guess that you can also generate the link with typoscript with condition over page existence in current language but it's more tricky.
You have a sample here : check if current page is translated

AEM How to prevent localization happening otb?

I have a scenario wherein i18n becomes overhead to content authors. The authors want dialog labels to be in English only for all locales. But certain headings/labels on dialog gets localized as they are available in otb dictionaries. Example label 'Advanced' from page properties dialog gets translated for non-english sites.
Is there a way I can prevent internalization happening?
If you refer to AEM's documentation for i18n, you can see its driven by the locale/language set in slingRequest. you can override this by explicitly fixing the i18n but if you do that none of your translations will work -
Locale pageLang = new Locale("en");
ResourceBundle resourceBundle = slingRequest.getResourceBundle(pageLang);
I18n i18n = new I18n(resourceBundle);
An other alternative (a little extra effort) in you need to do this only for dialog boxes is -
Create your own dictionary for translations, refer here
Use unique name-spacing for your keys eg - myapp.mycomponent_abc.label
Use above keys in your component dialog to ensure that your version of translation is picked. If for all languages you want english only dialogs, all your have to do is duplicate your english dictionary and change the language key in it to relevant language while keeping translations still in english.

Cakephp i18n how to get content in default language if translation is not available

I am using i18n table and have 2 languages, english (default) and italian. When I am on italian version I get all the rows with italian translations and where there is no translation available I get nothing. How can I get english texts for the rows without italian translation?
When I have Config.language == ita and try to display $this->Career->find('all'); for this row I get empty title and body. Is there any easy way of get the contet in eglish?
Thanks!
You need to set the model's locale to an array of the locales you want. By default it is set to the current Config.language.
$this->Career->locale = array('ita', 'eng');
$this->Career->find('all');
This will return all records. If the Italian translation is not present, it will give the English one.

Language is not changing in a component of Joomla

I am in the process of adding some lines of code to change the language automatically when the language is changed in the language selection module. One of my component in Joomla, it doesn't respect the language changing through language selection.
it's already the language.ini file is in the language directory is corresponding to this language. But the language is not changed. Is there any special joomla code to make it dynamic?
You should output text in Joomla like this:
echo JText::_("HELLO");
And you'll have to create an ini file with the language code and the name of the component/model. E.g.: en-GB.mod_modulename.ini. In this file you can define the translation for the string, like:
HELLO=Hola
When switching the language, the lines where JText is used, will display the correct language.

Resources