NestJS with language change based on URL - internationalization

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.

Related

Markup tags in product descriptions

I'm trying to use markup tags to link to info pages within the "description" attribute of a product. However, it's not giving me a clean URL path when the description is printed to the page.
Trying:
Contact Us
does not give the expected url. I've confirmed i'm doing this outside of WYSIWYG mode too.
When the text is rendered is returned to the browser as this html:
Contact Us
A resulting click on the link then ends up as:
http://example.com/prod-category/my-product/%7B%7Bstore%20url=
From what I can tell the markup tags aren't designed to be used in this way. Is it possible to extend it so it could work? Otherwise I guess I need to include the actual URL in the description?
Thanks for suggestions.
You can´t use the double-curly syntax because the attributes value is not being processed by magento´s template filter, which does the magic. You can use them e.g. in CMS or email Templates out of the box.

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

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 !!!

Change text of Please fill out this field tooltip in Joomla 3

It is set by default that when I create input fields and set them to be required, when users don't fill in anything, they got a massage:
Please fill out this field
I am creating a website with Joomla, and this tooltip pops out in every browser displaying the above text. How to change the text.
I tried to look up in Joomla language ini files, but no success. Is there some easy way to change this, or some advice where it could be?
This is not a Joomla string, it's the message displayed by the HTML5 required attribute. To change the message you have to check the loads of suggestions in the following questions:
HTML5 form required attribute. Set custom validation message?
How to change default “please fill out this field” in two field
if you are writing your own component (or module/plugin), it sounds like this is the description - field in the form-xml for your component. If the form is auto-generated from a component-creator, the file should be found in
/(administrator/)components/com_yourcomponent/models/forms
but some more info on where/what you are doing would help.
regards Jonas

swapping rails3 layout on the fly

I have am trying to dig into twitter bootstrap and rails3 sites that actually look and function well (new to it all). I have this feature I want where I have a twitter bootstrap navigation (specified in what I guess is the default application layout) that calls a _navigation.erb.html etc. This works great, but on that navigation i want a "Se Habla Espanol" or what not, where when the user clicks there, the navigation text all changes to spanish. i thought easiest would be have another _navigationespanol.erb.html or something that changes the navigation words all around and also when click (toggling into spanish mode) it sets all the text in the pages to spanish by anytime there is a text render or whatever a variable flag was set and is interrogated on page index render show or what have you and it renders spanish or english words...
So ideally click on see it all in spanish, it loads a new layout (my main question) that has the spanish navigation and messages and other twitter bootstrap stuff and it also sets a global var i can look at in other renders to see if im rendering english or spanish.
More than swapping layouts, it seems that you need to implement Internationalization (I18n). In such case you'll have to create an directory config/locales that holds a .yaml file for each of the language you're trying to have translation for, for instance:
# on a file called en.yml
en:
hello: "Hello world"
For a complete guide on how to go about it: Rails Internationalization (I18n) API

Open Graph ticker localization

My app adds lines like this to the ticker "[User] read [article] on [app]". I'd like to have that translated into Danish for users that use Facebook in Danish, so I've added this to the meta tags:
<meta property="og:locale" content="da_DK" />
The name of the object is "read", and the action is "article".
Unfortunately, the ticker line isn't shown in Danish, just English. How do I make it do that? I've already read https://developers.facebook.com/docs/internationalization/, but I can't get it to work. Is it possible that the action/object just haven't been translated into Danish by whomever translates Facebook? If so, how do I confirm that?
https://developers.facebook.com/tools/debug returns no error for the page, and the language tag seems to be correctly parsed.
Yeah, this kind of translation is done in the Facebook Translations app.
Go into your app settings, click edit, and on the left there will be a link to "Translate your App" - in this tool, you'll be able to specify the non-English structure of News Feed and Ticker stories.
The object itself (title etc) in Danish will be picked up from your object URL.
Talking about the Translations Admin Panel, tab Browse Phrases, column Status, reachable under:
https://www.facebook.com/translations/admin/dashboard.php?app={APP_ID}&aloc={LOCALE_YOU_TRANSLATE_TO}
What should then be the right value for this column? I have I approved at the moment and translations are not visible in the OpenGraph messages appearing in the Ticker or on the Timeline.

Resources