internationalization

Using angular i18n inside *ngFor loop with angular 5

让人想犯罪 __ 提交于 2019-12-22 14:03:50
问题 I would like to use dynamic translations inside a ngFor-Loop in template like this: <mat-card *ngFor="let user of usersList"> <mat-card-title> <span>{{user.name}}</span> </mat-card-title> <mat-card-content> <!--This is the enum i would like to translate dynamic --> <span i18n="Role@@role">{{user.role}}</span> </mat-card-content> </mat-card> Is there a way with the current on-board tools of angular 5 i18e (internationalization) to dynamically translate this enum value? As I read, in Angular 6

How to access the g.-namespace in a Domain Class

 ̄綄美尐妖づ 提交于 2019-12-22 12:47:40
问题 I would like to make use of the g.message() functionality in the toString method of my domain class, but the g.-namespace is not accessible by default. I doubt that a import g.* will do the trick. I already know that I can use the messageSource functionality, but it would be nicer to use the same syntax as in the views. 回答1: You can use: class MyDomain { def someMethod() { def g = ApplicationHolder.application.mainContext.getBean( 'org.codehaus.groovy.grails.plugins.web.taglib

Can GWT Properties be used from the server?

女生的网名这么多〃 提交于 2019-12-22 12:38:54
问题 I have a GWT app that uses GWT RPC to talk to App Engine servlets. I would like to use constants defined in a .properties file on the server. Is that possible? 回答1: To enable .properties in client you use GWT.create(file_name.properties); But this combination don't work on server-side, cause it's only availible on client-side, you'll get this error: GWT.create() is only usable in client code! It cannot be called, for example, from server code. But, I suppose, you can use standard approach of

Spring 4 i18n & l10n (Cannot change HTTP accept header)

寵の児 提交于 2019-12-22 10:21:15
问题 I need help to solve this error message. Im working with spring 4 and I want to implement i18n & l10n on my project. When I try to change language this message appears. Below follows my code. Please, anyone could help me with this issue? http://imgur.com/NZ9RaC8 Output: ago 21, 2014 10:29:43 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/webapp] threw exception [Request processing failed; nested exception is

Interface Builder Localization HowTo

你离开我真会死。 提交于 2019-12-22 10:05:07
问题 I was digging into Apple Developers' Docs to understand how localization/internationalization of apps should be done and I wanted to understand how Interface Builder helps you managing multiple NIB files for multiple languages... the docs point me to the "localization" section within the Interface Builder user Guide , but I can not find it.. should I find it within the Xcode 4 docs? Can someone point me a document that shows you how to implement localization within the Interface Builder/XCode

How to provide an alternate i18n language link in Angular with aot compiling?

China☆狼群 提交于 2019-12-22 09:53:28
问题 I am currently working on i18n of my Angular app. I use AOT compiling with xlf files to create pre-compiled apps as described here. In the build, I provide a language specific base href (using the --base-href parm). For example, this means, I end up with two language specific apps using the following url paths: /app_path/en/... /app_path/de/... Now I want to provide a link to the respective alternate language within my app by replacing for example en by de in the active url. I used the Router

Localization/Internationalization for Polymer 1.0

非 Y 不嫁゛ 提交于 2019-12-22 09:48:39
问题 I'm looking into solutions for polymer 1.0 and yet I find it hard to understand how this works. Found this https://github.com/Polymer/i18next-element which is unfortunately not even ready yet. Meanwhile I cannot figure out how to use i18next.I'm trying to combine all the info i can find, followed https://github.com/tabacha/javascript-i18n-example/blob/master/i18next/examle.html with any combinations from http://i18next.com/pages/sample.html and made sure to take a look at http://japhr

Static library and internationalization

ε祈祈猫儿з 提交于 2019-12-22 09:45:38
问题 I have a question regarding static libraries. I need to localize some text inside my library. So I created a bundle where I put my different localized files. Then, I created a function like this : NSString *MyLocalizedString(NSString* key, NSString* comment) { static NSBundle* bundle = nil; if (!bundle) { NSString* path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"MyStaticLib.bundle"]; bundle = [[NSBundle bundleWithPath:path] retain]; } return [bundle

PHP iconv greek/cyrillic transliteration does not work

↘锁芯ラ 提交于 2019-12-22 09:07:42
问题 i have the following test code: setlocale(LC_ALL, 'en_US.UTF8'); function t($text) { echo "$text\n"; echo "encoding: ", mb_detect_encoding($text), "\n"; // transliterate $text = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $text); echo "iconv: ", $text, "\n"; } // Latvian alphabet t('AĀBCČDEĒFGĢHIĪJKĶLĻMNŅOPRSŠTUŪVZŽ aābcčdeēfgģhiījkķlļmnņoprsštuūvzž'); // Greek alphabet t('ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκΜμΝνΞξΟοΠπΡρΣσςΤτΥυΦφΧχΨψΩω'); // Cyrillic alphabet + some rarer versions t(

Django i18n not recognizing language files

╄→гoц情女王★ 提交于 2019-12-22 09:00:10
问题 On Django 1.4, I want to have two languages in my site, turkish('tr') and english('en'). This is my current setup: settings.py: USE_I18N = True LANGUAGES = ( ('en', 'English'), ('tr', 'Turkish'), ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', # I have locale middleware 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',