Menu
  • HOME
  • TAGS

Word conjugation with Django i18n and gettext

django,internationalization,gettext

GNU's gettext manual advises that people translate whole sentences as much as possible: Entire sentences are also important because in many languages, the declination of some word in a sentence depends on the gender or the number (singular/plural) of another part of the sentence. There are usually more interdependencies between...

Rails I18n changes apostrophe to ASCII

ruby-on-rails,internationalization,responders

Does Responder still require you to add the flash in your html? In that case you could do something like <%= flash[:alert].html_safe %> to enforce html on your flash message, even for the escaped characters.

How to get the weekday names using Intl?

javascript,internationalization,ecmascript-intl

I was misled because I was using the Intl polyfill, which does not support yet { weekday: "short" } as option. Using native Intl implementations works as expected....

“Page not found” all over the place with i18n on Drupal?

drupal-7,internationalization,multilingual

The i18n module does not work if you set the prefix as A/B, only as A. In other words, you can have this: /us-en But not this /us/en Which is really annoying and I wish it didn't work this way, or that someone at least added validation so you can...

Internationalization in Java Error

java,eclipse,properties,internationalization,resourcebundle

Change your getBundle statements from: ResourceBundle message = ResourceBundle.getBundle("src/example/MessageBundle_en_US", lang); to: ResourceBundle message = ResourceBundle.getBundle("example/MessageBundle", lang); ...

Are there any unicode/wide chars that encode to multiple encoded characters

c,character-encoding,internationalization

MB_CUR_MAX is correct, but both are big enough. You might want to use MB_LEN_MAX if you want to avoid variable-length array declarations. MB_CUR_MAX is the maximum number of bytes in a multibyte character in the current locale. MB_LEN_MAX is the maximum number of bytes in a character for any supported...

Internationalization - how to handle gender?

cakephp,internationalization,cakephp-3.0

Using the context translation function is the way to go, your last example is the correct way of handling such cases. The problem is the I18N shells extract task, it uses only the message as the identifier to store the extracted values, resulting in the previous contexts to be overwritten....

translation issue in php

php,yii,internationalization,translation

It looks like your 'qelasy' dictionary is stored in proper utf-8 encoding. Try to not convert encoding....

Rails I18n not replacing variable

ruby-on-rails,internationalization,i18n-gem

facepalm I'd had issues with another translation and I initially called the variable 'format', I suspected it might be a reserved word or something of the sort so I changed all the translations to use format_title and forgot to update the views.

GWT i18n Message Properties does not Display special Character like ß

java,javascript,html,gwt,internationalization

This is a problem with the way Eclipse handles properties files. You can set the whole workspace to UTF-8, it will still treat properties files as ISO 8859-1 - because that's the default/expected encoding. However, GWT uses an enhanced properties file format that uses UTF-8 directly (without the need for...

Binding language not work

xml,internationalization,sapui5,sapui,openui5

I have resolved my problem! In my Component.js, in init function I had written: var oI18nModel = new sap.ui.model.resource.ResourceModel({ bundleUrl: "i18n/i18n.properties" }); sap.ui.getCore().setModel(oI18nModel, "i18n"); this.setModel(oI18nModel, "i18n"); and in createContent function I had written: // create root view var oView = sap.ui.view({ id: "app", viewName: "stg.view.App", type: "JS", viewData: { component:...

Grails: Organizing i18n bundles

grails,internationalization

Grails takes all bundles that are under the grails-app/i18n folder. So you can create a folder for each of your groups. To refer to them is just as simple as if it was in the messages.properties. I mean, if you have: grails-app/i18n/messages.properties foo.bar = foo bar grails-app/i18n/about/about.properties bar.foo = bar...

CakePhp i18n translation words order in .po files

php,cakephp,internationalization,cakephp-2.5

I've had issues in the past when passing the replacement arguments as multiple function arguments. Using an array tends to be more reliable:- __( 'Accèdez à tous les %spronostics%s d\'%s', [ '<span style="font-weight: bold; text-transform: uppercase">', '</span>', AppController::getSiteName() ] ) Update: You need to specify the correct order in the...

Create correct path by concatenating LTR with RTL strings

javascript,internationalization,filesystemobject

You should not insert these RLE(U+202B) LRE(U+202A) PDF(U+202C) control characters.

Shared behavior state across custom elements

javascript,internationalization,polymer,polymer-1.0

First, although the notion is to have behavior be a conduit for shared data between instances, as written, each instance will have it's own copy of the translations object and the kick property. Second, even if that data was privatized so it could be shared, the kick binding made via...

Test language switching on Codeship

django,internationalization,codeship

Adding an extra step in the codeship script to compile the po file resolved everything

Using babel and lingua in pyramid

localization,internationalization,pyramid,babel

Your message_extractors configuration may be outdated for recent versions of babel and lingua. For debugging purposes you could ask for lingua extractors. I actually do not know how to do this for babel. $ bin/pot-create --list-extractors chameleon Chameleon templates (defaults to Python expressions) python Python sources xml Chameleon templates (defaults...

How can I copy/pate multibyte characters on Android Emulator?

android,android-studio,internationalization

I think there is no way to do what you want. Digging in the sources, the input command line tool ends up calling KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD), and uses that KeyCharacterMap to map from characters to keys press / release events. Since KeyCharacterMap.VIRTUAL_KEYBOARD does not cover the whole Unicode range, it is not...

Change Struts 2, i18n classes behavior when key is not found

struts2,internationalization,jsp-tags

You need to create custom implementation of TextProvider and override getText methods in it. 1) Create class (e.g. EmptyDefaultTextProvider) extending one of TextProvider existing implementations (e.g. TextProviderSupport). 2) Override all getText methods like that: public String getText(String key, String defaultValue) { return super.getText(key, ""); } 3) Use your custom class...

Lithium routes with different locales

php,internationalization,lithium,php-5.5

I finally solved it extending HTML helper class: use lithium\template\helper\Html as BaseHtml; class Html extends BaseHtml { /** * Returns href lang link for a locale for the current request. * * @param string $locale * @return string <link /> */ public function getHrefLinkForLocale($locale) { return $this->link( 'Canonical URL for...

Spring MVC 3.1 change language i18n based on the request locale language

java,spring,spring-mvc,internationalization,locale

Thanks to you M. Deinum. Here is the solution: The solution is to use the AcceptHeaderLocaleResolver as LocaleResolver. I should have read the documentation better. applicationContext.xml: <!-- Internationalization i18n and l10n --> <!-- to activate message.properties --> <bean class="org.springframework.context.support.ReloadableResourceBundleMessageSource" id="messageSource"> <property name="basename" value="classpath:messages"></property> <property name="defaultEncoding"...

Tornado Localisation, set default language

localization,internationalization,locale,tornado

The default language is primarily used to tell Tornado what language the text in your code is: when the current language is the default, no translation files are used. If the text in your code is English but you want to use the German translation files no matter what the...

Translate path with rails i18n

ruby-on-rails,ruby-on-rails-4,localization,internationalization,rails-i18n

I suggest you take a look at route_translator gem. It'll help you translate your routes to any locale, handle the locale with a scope or a subdomain, etc. From your example, your would have something like this: MyApp::Application.routes.draw do localized do resources :mainclasses, path: :types end end Along with a...

Passing a hash to i18n translation

ruby-on-rails,ruby,internationalization,rails-i18n

Oh ok understood that! Please consider code below: # making a hash def serialized_message_object attr_hash = {} @user.attribute_names.each { |attr_name| attr_hash[('user_' + attr_name).to_sym] = @user[attr_name] } @user.attribute_names.each { |attr_name| attr_hash[('notifiable_' + attr_name).to_sym] = @notifiable[attr_name] } attr_hash end # call I18n I18n.t('notifications.' + message_type, serialized_message_object) # i18n ru: notifications: task: "New...

Validation message not found

spring,validation,internationalization,spring-boot,thymeleaf

Try putting your message key in ValidationMessages.properties instead of message.properties. The ValidationMessages resource bundle and the locale variants of this resource bundle contain strings that override the default validation messages. The ValidationMessages resource bundle is typically a properties file, ValidationMessages.properties, in the default package of an application. Source: http://docs.oracle.com/javaee/6/tutorial/doc/gkahi.html Also,...

How to use Yii::$app->language

internationalization,yii2

To set the application language, edit the file config/web.php : $config = [ 'id' => 'myapp', 'name' => My App', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'language' => 'pt',//HERE ... ] You can do all in a custom Controller class which should be extended by all your controllers. In the...

Internationalisation-correct way to select network adapter to bind to

windows,internationalization,ndis

You're right to worry about hard-coding the user-facing string. Not only is localization a problem, but the string actually changed in Windows 7. So "Microsoft Loopback Adapter" won't even match on an en-US version of a recent OS. The best invariant you can look for is the hardware ID of...

Jhipster update i18n language for a user

internationalization,jhipster

It looks like this is not implemented in Jhipster. So the lang_key is only set when you create a new user. I added it to my application by doing the following: NOTE: This is changing the language of the current user by setting it by the current language in use...

How do I use Angular i18n for languages it doesn't appear to support?

javascript,angularjs,internationalization,locale,angular-translate

Angular supports i18n Standard for location | globalization | internationalization. When it comes to number,dates and so fort for names of days, months, etc. Angular relies on $locale service for example in the case of number the property NUMBER_FORMATS. Here is the list of locations currently supported by angular: http://cdnjs.com/libraries/angular-i18n/...

Symfony - Getting a Supported Languages List

symfony2,internationalization

There is no built-in way. The only way to discover all languages for which you have translation files is to look for all folders containing translations and grab the locales from files....

How to prevent Rails locale=xx in URL (disable)?

ruby-on-rails,routes,internationalization

Yes this is what I have within routes (routes.rb): devise_for :users post '/feedbacks' => 'feedback#create' resources :careers resources :articles, :path => "blog" resources :tag scope '(:locale)', locale: /en|cs/ do root 'pages#home' resources :articles, :path => "blog" resources :tag end This is what I have within locale configuration (application.rb): config.i18n.default_locale =...

i18n cakephp 1.3 internatialization

cakephp,internationalization,cakephp-1.3

There shouldn't be any HTML markup in the string you want to translate. So you want to put your <span> tags in the replacement text:- <?= sprintf( __('bla bla bla %s bla', true), '<span id="count">' . $count . '</span>' ); ?> This will give you bla bla bla %s bla...

angularjs i18n routing with path params

javascript,angularjs,routes,internationalization,ngroute

I've ended up doing a kind of preliminary parse on the URL. Using only ngRoute (ui-router wasn't an option...), I check if the path matches with the restrictions, if not, a redirect is triggered, defining correctly the path. Below, follows a snippet of the solution, for the primary route, and...

switching between RTL and LTR in play framework

playframework,internationalization,playframework-2.3,scala-template

The closest thing I find that, I put a method in acontroller that get lang() then get if its RTL or LTR then load the CSSs and JSs accoding to that from my main.scala.html. so that I shouldn't be worry about passing the if statement from every controller method, the...

Struct or class for internationalized name object in .NET?

c#,class,internationalization,coding-style,structure

I think you are making it too complicated. Just let a Person have a property called Name instead. What is the purpose of the verification?...

Yii2 translation

internationalization,yii2

Your configuration looks correct. I assume you have the fr folder in your common/messages folder for your custom translations. You need to use Yii::t('app','your_custom_word');. your_custom_word should be defined in the common/messages/fr/app.php file....

Trying to translate fields of my classes (Django internationalization Cap)

python,django,django-models,internationalization,django-views

Model translations are not supported by Django out of the box. Those packages implement that feature: django-hvad django-modeltranslation ...

Spring Message Not Displaying

java,spring,jsp,spring-mvc,internationalization

ResourceBundleMessageSource basename (as opposed to ReloadableResourceBundleMessageSource) refers by default to the classpath, so you should have it like : <property name="basename" value="NLS" /> Now, depending on how you build, even if configuring correctly the message source, it may have been erased at the time you run the application. Do not...

What are the differences between i18n and l10n in AngularJS 1.3, 1.4 and 2?

angularjs,localization,internationalization

Since AngularJS 2.0 will be a whole rewrite I don't think it is a good idea to rely on being able to migrate from previous versions. Moreover, it is not going to be released soon and even version 1.4 is not stable yet. You should be always using the latest...

Internationalization of api error messages on front end or back end?

java,angularjs,spring,internationalization,angular-translate

If I had to do this, I would have done it on the back end, primarily because since the backend has the locale, and is also generating the errors, it does make sense to expect localized errors from it. It would also de-couple the systems, such that, if there is...

Drupal taxonomy terms language depending - why nodes in all languages are visible?

drupal-7,internationalization,drupal-taxonomy

I have set the vocabulary to Translate. Different terms will be allowed for each language and they can be translated. and duplicated each brand for each language and then updated each node - with setting term for particular language. In my opinion this is workaround, but I couldn't find other...

How to remove languages in transifex?

user-interface,localization,internationalization,translation,transifex

Sam from the Transifex team here. You can remove languages by going to Dashboard > Teams & Languages. From there, click the down arrow next to the team that's translating your project, then hit the Delete button next to the languages you want to remove. If you're interested, here is...

Configure internationalization from application.properties in spring boot

java,spring,spring-mvc,internationalization,spring-boot

is there a convention on how to map this to a properties file? No there isn't. It's only a single bean definition and it's entirely optional, so I would prefer to leave that in Java....

How do I check if strings called from a ResourceBundle exist without running?

java,internationalization,resourcebundle

You should use one or more classes where entries of your properties files are mapped with public static attributes. Like this everything is checked at compilation time and you avoid later random/unexpected behavior/error. public class Messages { public static final String cancel = "cancel"; } ... Locale locale = new...

Codeigniter view in Wordpress

php,wordpress,codeigniter,internationalization

You directly cannot call CI view in wordpress file. Inorder to make changes to wordpress header and footer you will need to modify header.php and footer.php file under wordpress theme (wp-content/themes/your_theme_folder). Also make sure that you do not modify wordpress default theme directly as any changes to default theme would...

How do I internationalize instance variables in button_to methods in my views?

ruby-on-rails,internationalization

Try passing the user: option to the t helper method: data: { confirm: t('.spam_confirmation', user: @topic.posts.first.account.name) } ...

Regexpression for check if string is locale like locale_Culture

php,regex,localization,internationalization

This is the right one :) /^[a-z]{2}_[A-Z]{2}$/ ...

i18n: Access locale resolution logic in JavaScript

javascript,localization,internationalization,single-page-application

Staś Małolepszy's answer is a good reference of the resources available for this problem domain. However, I found that none of these libraries suited my needs (either because their language negotiation logic was too simplistic, or because it wasn't really exposed). Therefore, I implemented my own custom solution for language...

System.NullReferenceException with registry edit in Vb.net

.net,vb.net,internationalization,registry,nullreferenceexception

There is a space between Control and Panel in the registry key you are trying to open. your code does not have a space. Try this instead: regkey = My.Computer.Registry.CurrentUser.OpenSubKey("Control Panel\International", True) You may also need to run your program as administrator to change that value in the registry...

How to use DbMessageSource in yii2

internationalization,yii2,multilanguage

try this: 'i18n' => [ 'translations' => [ '*' => [ 'class' => 'yii\i18n\DbMessageSource', 'forceTranslation'=>true, ] ], ], set parameter forceTranslation as true. This trick helps me....

PHP Date Formatting with IntlDateFormatter

php,date,internationalization

As ICU docs say: SHORT is numeric, such as 12/13/52 or 3:30pm MEDIUM is longer, such as Jan. 12, 1952 LONG is longer, such as January 12, 1952 or 3:30:32pm FULL is completely specified, such as Tuesday, April 12, 1952 AD or 3:30:42pm PST So probably you're right with rising...

Meteor: use dynamic parameters in a template call

validation,templates,meteor,internationalization,spacebars

Well, i don't know why i didn't see it before, but i can do this in the SimpleSchema: Meteor.startup(function() { Publications.attachSchema(new SimpleSchema({ name: { type: String, label: TAPi18n.__("name"), max: 200, autoform: { afFieldInput: { placeholder: TAPi18n.__("name") } } }, description: { type: String, autoform: { afFieldInput: { placeholder: TAPi18n.__("description") }...

Symfony 2 setting up translation files

symfony2,internationalization,yaml

First of all it should be messages.en.yml as indicated by @xurshid29, but most important it should be <title> {% block title %} {{ 'base.title.homePage'|trans }} {% endblock %} </title> inside the template. The value passed to the trans filter must be a string but base.title.homePage|trans would be expanded to something...

How to log exception in InvariantCulture?

c#,asp.net-mvc-4,exception-handling,internationalization,error-logging

The notion that exceptions should contain their own human-readable messages is very prevalent but also very misguided. In concept, The message conveyed by an exception is the type of the exception along with any member variables contained within the exception. What this also means is that: You have to have...

Fully Understanding hreflang

html5,internationalization,seo

Obviously I don't want Google to penalise me for duplicate content. Google does not penalize websites for duplicate content. Say for example I am on www.example.com/shop. Would I simply render the following within the head? Yes. Now if I was on www.example.com/fr/shop would I need to render the same...

Loading of Java message properties for internalization

java,localization,internationalization,translation,properties-file

According to this blog post you are right. So when the default locale of your system is de_DE and you request a resource for locale en_US, the lookup order for the properties files is: MyApp_en_US.properties MyApp_en.properties MyApp_de_DE.properties MyApp_de.properties MyApp.properties ...

Information for localization

localization,internationalization,units-of-measurement

Don't reinvent the wheel. Start with CLDR, the Common Locale Data Repository (http://cldr.unicode.org/) Or if you want to honor the locale preferences in your application, use standard I18N APIs (from you platform, whatever that is, or a popular library, like ICU, http://site.icu-project.org/)...

GWT i18n changing locale

java,gwt,internationalization

The default value for the locale.searchorder configuration property is queryparam,cookie,meta,useragent, so a query-string parameter will override the user-agent's locale (i.e. what you, and most people, would expect).

How to put HTML code into a .resx resource file?

c#,html,asp.net,internationalization,resx

Suggestion: Create the file you want, name it the way you want, e.g "my_template.html" then add this file to your project. Click on it, then select in the properties window "Build Action" and set it to "Embedded Resource". Whenever you want to access this file, you can use something like...

Rails i18n linking issue?

ruby-on-rails,internationalization

company.street should be a string, so you have to add missing quotation marks to it t('company.street')

How to translate select option elements in Pyramid?

internationalization,pyramid,pylons

The problem here (after talking about this on irc) is the command used to extract messages from a template: you are using Babel's update_catalog command. This is no longer support in current versions of lingua: lingua now has its own extraction framework. That means you need to use lingua's pot-create...

AngularJS: How to use translation (i18n) in controller for popup?

javascript,angularjs,internationalization

use $translate service var translatedErrorTitle = $translate.instant(ERROR.TITLE); var translatedErrorId = $translate.instant(ERROR.errorId); More info...

Django Internationalization gives fuzzy with capital letters

django,internationalization,django-1.7,po

Before execution of makemessages you had a msgid "Court" in the .po file. Django decided that the "court" is very similar to "Court" and created a "fuzzy" record with the same translation (which was empty). Just delete the #, fuzzy and #| msgid "Court" lines and run the compilemessages: #:...

Using Bootstrap Datepicker Internationally

twitter-bootstrap,datepicker,internationalization

From what the docs say here the following format is acceptable: "06-01-2012" Making your HTML look like so: <input id="myDatePicker" class="form-control input-sm" type="text" autocomplete="off" value="06-01-2015"> ...

Pattern to internationalize links in JSF

jsf,design-patterns,internationalization

JSF utility library OmniFaces offers <o:param> for the exact purpose. footer.privacyPolicy = Click {0} to view our privacy policy. footer.privacyPolicy.link = here <h:outputFormat value="#{i18n['footer.privacyPolicy']}" escape="false"> <o:param><h:link outcome="privacyPolicy" value="#{i18n['footer.privacyPolicy.link']}" /></o:param> </h:outputFormat> On contrary to <f:param>, it's capable of encoding child components as parameter value....

Generate english versions of same content on Drupal?

drupal-7,internationalization,multilingual

You could create a module implementing hook_node_insert(). This module would intercept the creation of a new node (stored with the default language) and create as many copies as needed. Each of these copies should have a different value in the field language. These copies colud be easily stored in the...

I18n month translation

ruby-on-rails,ruby-on-rails-4,internationalization,rails-i18n

controller: @previous_month = Date.today - (1%12).months view: I18n.l @previous_month, :format => "%B" ...

grails message as argument of other message

grails,internationalization,taglib

The solution to your issue is quite simple. You're trying to call a nested tag library from another but you're not quite doing it right: <g:message code="whatever" args="${message(code: 'somethingelse')}" /> Doing this should solve your issue....

AngularJS i18n: ngLocale FIRSTDAYOFWEEK and WEEKENDRANGE

angularjs,internationalization

For ngLocale files, "Monday is day 0 as specified by ISO-8601" ...as opposed to Javascript, where Date.prototype.getDay() returns 0 for Sunday. Watch out! I asked for this to be added to the documentation....

Set right-to-left orientation for NSButtonCell

objective-c,osx,internationalization,right-to-left

The solution is to manually set the "image" position and text alignment. [cell setImagePosition:NSImageRight]; [cell setAlignment:NSRightTextAlignment]; ...

Using a/an on an I18n message

ruby-on-rails,internationalization,rails-i18n

The most simple answer to your question, I think, would be to pass in the entire state with the correct indefinite article together. There's a question that looks at how to prepend "a" or "an" depending on a given word. A short answer is that there's a gem indefinite_article that...

Converting regex to account for international characters

php,regex,internationalization

Here are the required steps: Use the u pattern option. This turns on PCRE_UTF8 and PCRE_UCP (the PHP docs forget to mention that one): PCRE_UTF8 This option causes PCRE to regard both the pattern and the subject as strings of UTF-8 characters instead of single-byte strings. However, it is available...

zk internationalization by LabelLocator

internationalization,zk

The docs about ZK internationalization are quite straightforward. It seems you just do not have read up a couple of paragraphs: Then, we could register label locators when the application starts by use of WebAppInit as follows. public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit { public void init(WebApp wapp) throws Exception {...

rails i18n passed params get lost

ruby-on-rails,ruby-on-rails-4,internationalization,rails-i18n

You are incorrectly passing arguments to link_to_unless_current. The following is what you need to do: link_text = "en" # or whatever you like html_class = "my-navbar-link" link_to_unless_current link_text, {locale: "en", type: params[:type]}, {class: html_class} i.e. you need to separate the link options from the HTML options....

Python parsing date and find the correct locale_setting

python,datetime,internationalization,locale,datetime-parsing

To parse localized date/time string using ICU date/time format: #!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime import icu # PyICU import pytz # $ pip install pytz tz = icu.ICUtzinfo.getDefault() # any ICU timezone will do here df = icu.DateFormat.createDateTimeInstance(icu.DateFormat.MEDIUM, icu.DateFormat.MEDIUM, icu.Locale.getFrench()) df.setTimeZone(tz.timezone) ts = df.parse(u'3...

Plural forms with Java java.util.ResourceBundle

java,internationalization,j2objc

Here is how Java handles plural forms: https://docs.oracle.com/javase/tutorial/i18n/format/choiceFormat.html...

Spring MVC: message source doesnt seem to point to the properties

java,spring,internationalization

Here is the solution: Spring 4 with thymeleaf Internationalization not identify message from resource properties file To make a summary: you need to define 3 distinct beans for viewResolver, templateResolver and templateEngine. You cannot define all in the viewresolver definition. It seems that Spring demands the 3 distinct beans to...

NSLocale.preferredLanguages doesn't change when changing NSUserDefaults

swift,ios8,localization,internationalization

The key is named AppleLanguages (note the s at the end). I'm sure you know, but localized apps don't need to perform custom language selection. It's best to leave it to iOS which lets users define their global international settings....

lupdate is not getting tr() strings from QObject objects

qt,internationalization,translate

All compiled translation files (*.qm) should be in the /translations directory and you would load them as shown in QFileDialog localization. Unfortunately, the Qt libraries don't come with all translations for all languages, and, not all the translations supplied are complete. For the version that I have (Qt 5.2.1), there...

How can I localize my Meteor JS App?

meteor,internationalization

This is more a comment than an answer (however my repu still is too low :o): Localization normally is only needed client side (there are exceptions but not many and they can be dealt with) and as Meteor is quite young with an own templating engine it's normal that you...

i18n in Cakephp 3 + Wordpress

wordpress,internationalization,cakephp-3.0

Why not declare the functions before the cakephp core is loaded? That is, load the file in wordpress that declares the translation functions and then declare your override of the cakephp functions. include wordpress/file_having_translation_functions; function ___(...) { return I18n::...; } ...

angular-translate: how to reset translation table dynamically in $translationProvider?

angularjs,internationalization,ionic,translate,angular-translate

Providers can only be used during the configuration phase. Once the application runs, only services (created by the providers) are available. But the $translate service has a refresh() method....

How to keep a variable in the URL when using Spring LocaleChangeInterceptor

java,spring,jsp,spring-mvc,internationalization

Do you mean you clicked a link with "http://xxx?lang=it"? If so, you should handle by yourself. eg. you could add a data-lang attribute, by that, add current href, like that: location.href = location.href + $("xx").data("lang");

How Do I Use the route_translator gem and not require the Locale?

ruby-on-rails,localization,routes,internationalization,rails-i18n

I had the same problem... the solution. Change your file ..\config\routes.rb to this: MyRailsApp::Application.routes.draw do localized do match "/about", to: "pages#about", via: "get" match "/clients", to: "pages#clients", via: "get" match "/contact", to: "pages#contact", via: "get" match "/manage", to: "pages#manage", via: "get" match "/media", to: "pages#media", via: "get" match "/privacy", to:...

JSP includes tags for internationalization

java,jsp,internationalization,jsp-tags

put the lines in a jsp & include it in the current jsp i;e template.jsp as <@include file="path/jspcontaininglibs.jsp"/> <html> <body> <fmt:message key='login.label.username'/> <jsp:include page='/home/header.jsp' flush='true'/> <jsp:include page='/home/body.jsp' flush='true'/> <jsp:include page='/home/footer.jsp' flush='true'/> </body> </html> ...

How to disable standard translation loaders in Symfony2

php,symfony2,internationalization,translation

You're missing few things to disable standard translation loaders in your app. Register service Add to your services your custom translation loader (remember to replace class with your own): services: my.translation.loader.dbext: class: YouApp\CommonBundle\Services\MyTranslationLoader arguments: [@doctrine.orm.entity_manager] tags: - { name: translation.loader, alias: dbext} dbext - is extension of fake messages files...

angular-translate module 'pascalprecht.translate' not found

javascript,angularjs,internationalization,angular-translate

It was failing because of another dependency throwing an error, specifically jquery.easy-pie-chart. I wasn't using that dependency at all so I removed it and angular-translate started working without a problem.

How can i force Android to not use certain language files that are within a used library project?

android,internationalization

If you are using Android Studio, add a resConfigs line to your build.gradle file, to limit the packaging system to only include your desired languages: android { // other stuff defaultConfig { // other stuff resConfigs "en", "de", "fr", "es" } } See Cyril Mottier's "Putting your APKs on a...

how to add Urdu language support in spring web application

java,spring,spring-mvc,internationalization

Check the following steps (after downloading the example and unpacking): Added WEB-INF\classes\messages_ar.properties Set encoding in WEB-INF\views\home.jsp <%@ page session="false" contentType="text/html; charset=UTF-8" %> Result: Reload application/browser ...

Sails.js : use i18n in my controller

node.js,view,controller,internationalization,sails.js

Just as the doc say http://sailsjs.org/#!/documentation/concepts/Internationalization req.__('error'); Or to force french : sails.__({ phrase: 'error', locale: 'fr' }); ...

How can I use duration() on local moment instance?

javascript,internationalization,momentjs

In short, you cannot using localMoment. A moment object returned by a called to moment() does not have a duration function (whether you set a specific locale or keep the default). The duration functionality belongs to the module itself (the 'object' returned by the require call). It was designed this...

Django way for multiple translations for one language or parametrize translations

python,django,internationalization,translation

You might get away with using contextual markers: https://docs.djangoproject.com/en/1.8/topics/i18n/translation/#contextual-markers and pgettext() though you may have to manually add them to your generated .pot file as the standard extract won't pick up available options if they are parametised.

Is there any NuGet package for adding gettext support in C# / ASP.NET? [closed]

c#,asp.net-mvc,localization,internationalization

There is actually one package that seem to satisfy most of the needs, namely i18N-Complete. This includes support for plural forms; explicit support for Razor markup (allowing l10n of views too); it is actually a NuGet package. My only concern about this package is if it is still actively maintained:...

CakePHP - Can't query model that has TranslateBehvior from a shell

cakephp,internationalization

When beeing accessed from a controller, the I18n classes have been setup already and the behavior knows which language to choose. From a shell no session and/or browser identification is known, so there will be no language selected. You can overcome this by putting Configure::write('Config.language', 'en'); or add $this->MyModel->locale =...

JMS Translation Bundle does not extract keys from controllers in Symfony2 - getTranslationMessages()

symfony2,internationalization,jms,translation

Found solution. You need to provide the domain on which the translations should be extracted to. $translator = $this->get('translator'); $translator->trans('FavTrans.No_trans_found', array(), 'SmartAdminBundle') ...

Text internationalization in Javascript using liferay-ui:message

javascript,internationalization,liferay

Converting my comment into answer :) Hi, You can try this code snippet <%= UnicodeLanguageUtil.get(pageContext, "please-choose-file-type") %> HTH...

Cakephp 3.0.0-RC2 I18n::locale() doesn't works

php,cakephp,internationalization,locale,cakephp-3.0

Because you redirect to another controller. Which mean locale can be override in that controller or AppController. Why don't you use session? public function login() { if ($this->request->is('post')) { $user = $this->Auth->identify(); if ($user) { $this->Auth->setUser($user); $this->request->session()->write('Config.language', 'du'); return $this->redirect($this->Auth->redirectUrl()); } $this->Flash->error(__("Nom d'utilisateur ou mot de passe incorrect, essayez à...

Best practice for sharing translation of Active Record attributes

ruby-on-rails,activerecord,internationalization,yaml,rails-activerecord

se: common: &common name: "Namn" activerecord: attributes: user: <<: *common town: "Stad" admin: <<: *common level: "Nivå" pet: <<: *common company: <<: *common food: <<: *common ...