Localization of custom keycloak login theme - keycloak

I am implementing a custom login page for keycloak (version 2.5), by following this guide. I added my own custom styling, now I am trying to add the Dutch locale. Currently no Dutch locale is provided, so I provided following properties files:
themes/mytheme/login/messages/messages_en.properties
themes/mytheme/account/messages/messages_en.properties
themes/mytheme/email/messages/messages_en.properties
with the locale_nl=Nederlands property. After that I added the messages_nl.properties files with the translation strings.
Next I added the locales=en,nl,de property to following files:
themes/mytheme/login/messages/theme.properties
themes/mytheme/account/messages/theme.properties
themes/mytheme/email/messages/theme.properties
There is only one thing left to do: add the Dutch locale in the admin console. But I can't select the NL locale after I enabled internationalization. I can only select the English and German locale, my just created Dutch locale is not available:
According to Multilingual support and adding custom Locales in Keycloak, I should be able to add my own locale by just typing the locale and hitting 'enter', but that does not do anything.
I am missing a step here?

After reading the code, I understood only adding the files is not enough. You need to enable your theme not only for the login theme, but also for the account and email themes:
As I only changed the login theme to my own 'custom-theme', the Dutch locale did not show up.

Related

How to change default settings when adding new users?

I wonder how it is possible to change the default settings for creating new users. At the moment I must remove the “live edit” permission and change the BE language to german for every single user.
I have two groups for my users AUTHOR and MAINAUTHOR. Members of AUTHOR should only have access to the draft workspace and only MAINAUTHOR’s members should have the live workspace too. (MAINAUTHOR inherits from AUTHOR and should add only the live permission.)
I found out that I can use setup.override.lang = de in the group options to change the language but I can’t find an equivalent for the live permission.
You can change the default pageTS for your own user via userTS (or for a whole group).
There you can use TCAdefaults to set default values for your be_users table.
https://docs.typo3.org/m/typo3/reference-tsconfig/11.5/en-us/PageTsconfig/TcaDefaults.html
Example from TYPO3 Core Docs for pages table
# Show newly created pages by default
TCAdefaults.pages.hidden = 0
You could try the extension sys_workflows[1] which was made for these kind of tasks. The extension should work on TYPO3 4.5 but doesn't work on a 6.2beta3 (just tested).
[1] http://forge.typo3.org/projects/extension-sys_workflows
You can configure the default values in the user TSconfig for new users. All options are described in the user TSconfig manual: https://docs.typo3.org/m/typo3/reference-tsconfig/11.5/en-us/UserTsconfig/Setup.html
Also explained is how to configure user TSconfig in general:
https://docs.typo3.org/m/typo3/reference-tsconfig/11.5/en-us/UsingSetting/UserTSconfig.html

Facebook widget (by Milap Patel) how to translate the text?

im using the facebook widget for wordpress by: http://wordpress.org/extend/plugins/facebook-pagelike-widget/
on my blog, but I would like to translate or change the text that currently says "Find us on Facebook". Is that posible?
Ive search through the plugin folder and its files but im not experienced enough or its just not there. please help if posible.
In the plugin folder you can edit the file named fb.js on line 7:
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId="+appid;
Change en_US to the locale you want. The full list of available Facebook locales can be found here: https://www.facebook.com/translations/FacebookLocales.xml
The problem with doing this will be the locale will switch back to en_US if you install an update to the plugin. I would get your own embed code from Facebook (https://developers.facebook.com/docs/reference/plugins/like-box/) and paste it into your theme or a HTML widget for your sidebar.

Magento uses default/default as skin theme in newsletter instead of site theme default/my_theme?

I was testing the admin password retrieval email template and the message Magento sent to my admin email uses default/default/images/logo_email.gif as the logo. However, my current site theme is default/my_theme so I thought it should use default/my_theme/images/logo_email.gif but it didn't.
I then tried some other email templates such as new account creation and user password retrieval templates and they are all fine with default/my_theme logo rather than the default/default one.
Is there a problem or is it by design that admin emails use everything in default/default rather than my specified theme?
In your question you didn't state which area your theme settings refer to. I'm assuming you are referring to the frontend store view configuration.
The email is sent by the method Mage_Admin_Model_User::sendPasswordResetConfirmationEmail()
This method calls $mailer->setStoreId(0), which causes Magento to look for the theme configured for the adminhtml area.
This defaults to default/default in according to Mage/Adminhtml/etc/config.xml in the node stores/admin/design/package/name and stores/admin/design/theme/default.
If you are using a Magento version including the Find_Feed extension (in the community code pool), it (stupidly) specifies the admin theme default/find in it's config.xml.
So this gives you the full path
skin/adminthml/default/default/images/logo_email.gif or skin/adminthml/default/find/images/logo_email.gif.

fb like button shows allways as locale en_US

I am using the XFBML Facebook like button on my german website.
The locales were changed to de_DE to display "Gefällt mir" and it worked for some days.
But now it is ignoring the locales and everybody sees "Like".
I can not figure out why it has changed.
The used code is the same as before.
The used web server is located in germany.
My facebook account is set to german language.
What else could have an effect?
I have found my mistake...
My CMS also uses the possibility to login using a FB account.
For that it loads the javascript sdk again in the footer of the page.
This version was set to en_US!
which version of the javascript sdk u are loading in your page that contains the like button?
make sure you are loading the de_DE version

How to disable localization for facebook like button

Facebook like button looks like "Мне нравится" on my russuin windows. How to disable this behavior? I want to see the same button on all browser and platfroms.
the language is set in the code (in this case 'en_US'):
<script src="http://connect.facebook.net/en_US/all.js#appId=XXXXXXXXX&xfbml=1"></script>
here's a list of all language codes:
facebook locales
yours is probably ru_RU so replace that with the code for your preferred language
Facebook locales follow ISO language and country codes respectively, concatenated by an underscore.
If the user is currently logged into Facebook, it will display in their localized language. If not, I believe it defaults to the language you specify in the script file include.